
          expect.objectContaining({ type: 'start', utterance: utterance3 })
        );

        utterance3.dispatchEvent(new SpeechSynthesisEvent('end', { utterance: utterance3 }));

        expect(speechSynthesis.paused).toBe(false);
        expect(speechSynthesis.pending).toBe(false);
        expect(speechSynthesis.speaking).toBe(false);

        expect(utterance3.onend).toHaveBeenCalledTimes(1);
        expect(utterance3.onend).toHaveBeenLastCalledWith(
          expect.objectContaining({ type: 'end', u