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): allow CRLF in voice recording gate assertion (#1440)

xxxcc2ce6bcd94fa8
diff --git a/apps/desktop/src/renderer/voice-input/__tests__/VoiceInputSection.recordingGate.test.ts b/apps/desktop/src/renderer/voice-input/__tests__/VoiceInputSection.recordingGate.test.ts
index 2e197080fe..ca3fd8b807 100644
--- a/apps/desktop/src/renderer/voice-input/__tests__/VoiceInputSection.recordingGate.test.ts
+++ b/apps/desktop/src/renderer/voice-input/__tests__/VoiceInputSection.recordingGate.test.ts
@@ -82,10 +82,10 @@ describe('VoiceInputSection shortcut recording gate', () => {
);
expect(source).toMatch(
- /const startFnKeyCapture = useCallback\([\s\S]*?\n {2}\}, \[\]\);\n\n \/\//,
+ /const startFnKeyCapture = useCallback\([\s\S]*?\r?\n {2}\}, \[\]\);\r?\n\r?\n \/\//,
);
expect(source).not.toMatch(
- /const startFnKeyCapture = useCallback\([\s\S]*?\n {2}\}, \[t\]\);\n\n \/\//,
+ /const startFnKeyCapture = useCallback\([\s\S]*?\r?\n {2}\}, \[t\]\);\r?\n\r?\n \/\//,
);
expect(source).toContain('const translateRef = useRef(t);');
expect(source).toContain('translateRef.current = t;');