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

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

        expect(utterance1.onend).toHaveBeenCalledTimes(1);
        expect(utterance1.onend).toHaveBeenLastCalledWith(
          expect.objectContaining({ type: 'end', utterance: utterance1 })
        );
        expect(utterance1.onpause).toHaveBeenCalledTimes(1);
        