Skip to content

Commit

Permalink
chore: add debounce tick to the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Dzianis Dashkevich committed Nov 5, 2024
1 parent d1f43c7 commit 3c74bd2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/playlist-controller.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4859,6 +4859,7 @@ QUnit.test('can pass or select a playlist for fastQualityChange', function(asser
};

pc.fastQualityChange_(pc.main().playlists[1]);
this.clock.tick(110);
pc.runFastQualitySwitch_();
assert.deepEqual(calls, {
resetEverything: 1,
Expand All @@ -4868,6 +4869,7 @@ QUnit.test('can pass or select a playlist for fastQualityChange', function(asser
}, 'calls expected function when passed a playlist');

pc.fastQualityChange_();
this.clock.tick(110);
pc.runFastQualitySwitch_();
assert.deepEqual(calls, {
resetEverything: 2,
Expand Down
3 changes: 3 additions & 0 deletions test/videojs-http-streaming.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4920,6 +4920,9 @@ QUnit.test('eme handles keystatuschange where status is output-restricted', func
assert.equal(playlists[0].excludeUntil, Infinity, 'first HD playlist excluded');
assert.equal(playlists[1].excludeUntil, Infinity, 'second HD playlist excluded');
assert.equal(playlists[2].excludeUntil, undefined, 'non-HD playlist not excluded');

this.clock.tick(110);

assert.equal(switchMediaCalled, 1, 'switchMedia_ called once');
});

Expand Down

0 comments on commit 3c74bd2

Please sign in to comment.