The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test(desktop): trim edge-TTS sentence-queue tests to two invariants
kshitijk4poore84313f65b3a
diff --git a/apps/desktop/src/app/chat/composer/hooks/use-voice-conversation-rearm.test.tsx b/apps/desktop/src/app/chat/composer/hooks/use-voice-conversation-rearm.test.tsxindex dc41ee570b4..070213502fb 100644--- a/apps/desktop/src/app/chat/composer/hooks/use-voice-conversation-rearm.test.tsx+++ b/apps/desktop/src/app/chat/composer/hooks/use-voice-conversation-rearm.test.tsx@@ -345,19 +345,4 @@ describe('useVoiceConversation playback rearm', () => {expect(mocks.playSpeechText).toHaveBeenCalledTimes(1)expect(mocks.handle.start).toHaveBeenCalledTimes(1)})-- it('honors Stop while waiting for the next fallback sentence', async () => {- mocks.useFallbackSpeech()- const { finishResponse, hook } = renderIncrementalFallbackConversation()-- await beginReply(hook)- await waitFor(() => expect(mocks.playSpeechText).toHaveBeenCalledTimes(1))-- mocks.stopVoicePlayback()- await waitFor(() => expect(hook.result.current.status).toBe('idle'))- finishResponse()-- expect(mocks.playSpeechText).toHaveBeenCalledTimes(1)- expect(mocks.handle.start).toHaveBeenCalledTimes(1)- })})diff --git a/apps/desktop/src/lib/speech-text.test.ts b/apps/desktop/src/lib/speech-text.test.tsindex 1478f4a5c37..67709d7c3d4 100644--- a/apps/desktop/src/lib/speech-text.test.ts+++ b/apps/desktop/src/lib/speech-text.test.ts@@ -1,6 +1,6 @@import { describe, expect, it } from 'vitest'-import { cutSentences, IncrementalSpeechSentenceBuffer, sanitizeTextForSpeech } from './speech-text'+import { cutSentences, sanitizeTextForSpeech } from './speech-text'describe('sanitizeTextForSpeech', () => {it('does not speak placeholders for fenced code blocks', () => {@@ -226,29 +226,6 @@ After the table.`})})-describe('IncrementalSpeechSentenceBuffer', () => {- it('emits completed sentences while retaining the unfinished tail', () => {- const buffer = new IncrementalSpeechSentenceBuffer()-- expect(buffer.append('The first sentence is ready. The second')).toEqual(['The first sentence is ready.'])- expect(buffer.append(' sentence is ready too. ')).toEqual(['The second sentence is ready too.'])- expect(buffer.flush()).toEqual([])- })-- it('keeps short fragments with the following sentence', () => {- const buffer = new IncrementalSpeechSentenceBuffer()-- expect(buffer.append('Hi! This longer sentence is ready. ')).toEqual(['Hi! This longer sentence is ready.'])- })-- it('does not emit a reasoning block split across deltas', () => {- const buffer = new IncrementalSpeechSentenceBuffer()-- expect(buffer.append('<think>Private reason.')).toEqual([])- expect(buffer.append('</think> The public answer is ready. ')).toEqual(['The public answer is ready.'])- })-})-describe('cutSentences', () => {it('emits complete sentences and holds the incomplete tail', () => {const { sentences, rest } = cutSentences('This is the first full sentence. And then it keeps goi', false)