Skip to content

Commit

Permalink
feat: Add test to verify stopping playbacks directly
Browse files Browse the repository at this point in the history
  • Loading branch information
ctoth committed Aug 22, 2024
1 parent a9ee251 commit 06f0765
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/cacophony.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 06f0765

Please sign in to comment.