Skip to content

Commit

Permalink
test: cover _manifestParsed value updated on _setup method case
Browse files Browse the repository at this point in the history
  • Loading branch information
joaopaulovieira committed Jan 31, 2021
1 parent e4433e7 commit 8fda934
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/hls.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,15 @@ describe('HlsjsPlayback', () => {
expect(playback.options.hlsPlayback).toEqual({ ...options.hlsPlayback, ...playback.defaultOptions })
})
})

describe('_setup method', () => {
test('sets _manifestParsed flag to false', () => {
const playback = new HlsjsPlayback({ src: 'http://clappr.io/foo.m3u8' })
expect(playback._manifestParsed).toBeUndefined()

playback._setup()

expect(playback._manifestParsed).toBeFalsy()
})
})
})

0 comments on commit 8fda934

Please sign in to comment.