From 8fda9347473ebbfc2e9af32a1192896e99452989 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Paulo?= Date: Sun, 31 Jan 2021 14:16:51 -0300 Subject: [PATCH] test: cover _manifestParsed value updated on _setup method case --- src/hls.test.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/hls.test.js b/src/hls.test.js index a244f1c..a34eb3d 100644 --- a/src/hls.test.js +++ b/src/hls.test.js @@ -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() + }) + }) })