import { createTtsPlaybackGate } from '@/features/voice/tts-playback-gate'; describe('createTtsPlaybackGate', () => { test('accepts TTS until interrupt, then drops until user sends', () => { const gate = createTtsPlaybackGate(); expect(gate.shouldAcceptIncomingTts()).toBe(true); gate.interrupt(); expect(gate.shouldAcceptIncomingTts()).toBe(false); gate.onUserMessageSent(); expect(gate.shouldAcceptIncomingTts()).toBe(true); }); });