From 06f0765909b9d1ec6879deff70b720f391b62993 Mon Sep 17 00:00:00 2001 From: "Christopher Toth (aider)" Date: Thu, 22 Aug 2024 10:16:30 -0600 Subject: [PATCH] feat: Add test to verify stopping playbacks directly --- src/cacophony.test.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/cacophony.test.ts b/src/cacophony.test.ts index 103437b..80196f6 100644 --- a/src/cacophony.test.ts +++ b/src/cacophony.test.ts @@ -295,6 +295,13 @@ describe("Playback class", () => { expect(playback.source).toBeUndefined(); }); + it("can stop playbacks directly", () => { + playback.play(); + expect(playback.isPlaying).toBe(true); + playback.stop(); + expect(playback.isPlaying).toBe(false); + }); + it("can play after seeking", () => { const seekTime = 2; playback.seek(seekTime);