Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

test(auth): fix the rebase fallout in the auth test harnesses

CHEYAN9d047441ee09
diff --git a/apps/desktop/src/main/__tests__/authPostCommitStartup.test.ts b/apps/desktop/src/main/__tests__/authPostCommitStartup.test.ts
index 9a69ff4771..dc5379f8da 100644
--- a/apps/desktop/src/main/__tests__/authPostCommitStartup.test.ts
+++ b/apps/desktop/src/main/__tests__/authPostCommitStartup.test.ts
@@ -58,6 +58,9 @@ function setup(mode: 'cloud' | 'local' | 'signed-out', passive = false) {
productionFunction('requestStableOwnerPostCommit'),
productionFunction('recoverAccountFreeOwnerAtStartup'),
productionFunction('initialize'),
+ `let authStateEpoch = 0;
+ let settledLoginCommitCount = 0;
+ ${productionFunction('initialize')}`,
'return { initialize, recoverAccountFreeOwnerAtStartup, requestStableOwnerPostCommit };',
].join('\n'),
{ compilerOptions: { target: ScriptTarget.ES2022 } },
diff --git a/apps/desktop/src/main/__tests__/authStartupGate.test.ts b/apps/desktop/src/main/__tests__/authStartupGate.test.ts
index db2251b91c..296088707a 100644
--- a/apps/desktop/src/main/__tests__/authStartupGate.test.ts
+++ b/apps/desktop/src/main/__tests__/authStartupGate.test.ts
@@ -369,6 +369,8 @@ describe('ColdStartAuthFallbackRegistry', () => {
await expect(resolveColdStartTimeoutRecovery({
ownerTransitionPending: false,
authChangedSinceInitialize: false,
+ loginCommitPending: false,
+ loginCommittedSinceInitialize: false,
isStartupFallbackEpoch: (epoch) => registry.containsOnlyFallbacks(flowEpoch, epoch),
timeoutStartEpoch: flowEpoch,
currentEpoch,
@@ -379,6 +381,8 @@ describe('ColdStartAuthFallbackRegistry', () => {
await expect(resolveColdStartTimeoutRecovery({
ownerTransitionPending: false,
authChangedSinceInitialize: false,
+ loginCommitPending: false,
+ loginCommittedSinceInitialize: false,
isStartupFallbackEpoch: (epoch) => registry.containsOnlyFallbacks(flowEpoch, epoch),
timeoutStartEpoch: flowEpoch,
currentEpoch,