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(desktop): tolerate formatting in recovery assertion

DavidShence736276cc02
diff --git a/apps/desktop/src/renderer/__tests__/cindyMakeInlineEntry.test.ts b/apps/desktop/src/renderer/__tests__/cindyMakeInlineEntry.test.ts
index 0c80d4b605..2c8083690c 100644
--- a/apps/desktop/src/renderer/__tests__/cindyMakeInlineEntry.test.ts
+++ b/apps/desktop/src/renderer/__tests__/cindyMakeInlineEntry.test.ts
@@ -33,7 +33,8 @@ describe('Cindy Make composer presentation', () => {
expect(interactionGuard).toContain('pendingGhostGrantConfirm ? null');
expect(sessionView).toContain('if (cindyMakeInputLocked) return false;');
expect(sessionView).not.toContain('CindyMakeResumeCard');
- const recovery = sessionView.indexOf(') : cindyMakeRecoveryId && session ? (');
+ const recoveryMatch = sessionView.match(/\)\s*:\s*cindyMakeRecoveryId\s*&&\s*session\s*\?\s*\(/);
+ const recovery = recoveryMatch?.index ?? -1;
expect(recovery).toBeGreaterThan(mask);
expect(recovery).toBeLessThan(input);
expect(sessionView.slice(recovery, input)).toContain('<CindyMakeTestCard');