From da123bb838987905b73de8359b8d053c086267fd Mon Sep 17 00:00:00 2001 From: xxxcc Date: Mon, 3 Aug 2026 12:54:38 +0800 Subject: [PATCH] test(desktop): allow CRLF in voice recording gate assertion Signed-off-by: xxxcc --- .../__tests__/VoiceInputSection.recordingGate.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 2e197080fe1..ca3fd8b807c 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;');