Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
felix-hoc committed Dec 19, 2024
1 parent 236e5dc commit 935380a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/components/seekbar.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ describe('SeekBar', () => {

jest.spyOn(playerMock, 'getSeekableRange').mockImplementation(() => ({start: 26, end: 30}));

seekbar['onSeekPreviewEvent'](40, true)
seekbar['onSeekPreviewEvent'](40, 100, true);

playerMock.eventEmitter.fireSegmentRequestFinished();

Expand All @@ -127,19 +127,19 @@ describe('SeekBar', () => {
it('will update the scrubber location after a successful segment request download and the user is not scrubbing', () => {
jest.spyOn(playerMock, 'getSeekableRange').mockImplementation(() => ({start: 26, end: 30}));

seekbar['onSeekPreviewEvent'](18, false)
seekbar['onSeekPreviewEvent'](18, 100, false);

playerMock.eventEmitter.fireSegmentRequestFinished();

expect(setPlaybackPositionSpy).toHaveBeenLastCalledWith(18);
expect(setBufferPositionSpy).toHaveBeenLastCalledWith(18)
expect(setBufferPositionSpy).toHaveBeenLastCalledWith(18);
});
});
});

describe('group playback', () => {
beforeEach(() => {
jest.spyOn(playerMock, 'getDuration').mockReturnValue(0)
jest.spyOn(playerMock, 'getDuration').mockReturnValue(0);
seekbar.configure(playerMock, uiInstanceManagerMock);
});

Expand Down

0 comments on commit 935380a

Please sign in to comment.