Skip to content

Commit

Permalink
chore: additional coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
adrums86 committed Jul 16, 2024
1 parent e4f42e0 commit 17e04ba
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/segment-loader.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ QUnit.test('fixBadTimelineChange calls pause, resetEverything and load on a segm
let pauseCalls = 0;
let resetEverythingCalls = 0;
let loadCalls = 0;
const mockSegmentLoader = {
let mockSegmentLoader = {
pause() {
pauseCalls++;
},
Expand All @@ -537,6 +537,13 @@ QUnit.test('fixBadTimelineChange calls pause, resetEverything and load on a segm
assert.equal(pauseCalls, 1, 'calls pause once');
assert.equal(resetEverythingCalls, 1, 'calls resetEverything once');
assert.equal(loadCalls, 1, 'calls load once');

// early return if undefined. call counts remain the same.
mockSegmentLoader = undefined;
fixBadTimelineChange(mockSegmentLoader);
assert.equal(pauseCalls, 1, 'calls pause once');
assert.equal(resetEverythingCalls, 1, 'calls resetEverything once');
assert.equal(loadCalls, 1, 'calls load once');
});

QUnit.module('safeBackBufferTrimTime');
Expand Down

0 comments on commit 17e04ba

Please sign in to comment.