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): locate login action independently of its parameter type

Dashd0605856d418
diff --git a/apps/desktop/src/main/__tests__/authHostedCallback.test.ts b/apps/desktop/src/main/__tests__/authHostedCallback.test.ts
index ace441e3bb..698b1af6df 100644
--- a/apps/desktop/src/main/__tests__/authHostedCallback.test.ts
+++ b/apps/desktop/src/main/__tests__/authHostedCallback.test.ts
@@ -286,7 +286,8 @@ describe('openSystemBrowserAuthorization 分流', () => {
loopbackStart,
source.indexOf('\n}\n\n// ── Refresh scheduling', loopbackStart),
);
- const actionStart = source.indexOf('async function runLoginAction(action: DesktopLoginAction)');
+ const actionStart = source.indexOf('async function runLoginAction(');
+ expect(actionStart).toBeGreaterThan(-1);
const actionBody = source.slice(
actionStart,
source.indexOf('\n}\n\nexport async function dispatchLoginAction', actionStart),