From ef06804f5f7cf49bc49c8472ab9354a14adae184 Mon Sep 17 00:00:00 2001 From: artem Date: Thu, 19 Dec 2024 10:26:43 +0200 Subject: [PATCH] fix tests --- modules/adplayerproVideoProvider.js | 10 +++++----- .../adplayerproVideoProvider_spec.js | 18 +++++++++--------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/modules/adplayerproVideoProvider.js b/modules/adplayerproVideoProvider.js index 7f9b2ff3b69..bd26be63b96 100644 --- a/modules/adplayerproVideoProvider.js +++ b/modules/adplayerproVideoProvider.js @@ -352,13 +352,13 @@ export const utils = { }, getPlcmt: function ({type, autoplay, muted, file}) { - type = type || "inStream"; + type = type || 'inStream'; if (!file) { - //INTERSTITIAL: primary focus of the page and take up the majority of the viewport and cannot be scrolled out of view. - return type === "rewarded" || type === "inView" ? PLCMT.INTERSTITIAL : PLCMT.OUTSTREAM; + // INTERSTITIAL: primary focus of the page and take up the majority of the viewport and cannot be scrolled out of view. + return type === 'rewarded' || type === 'inView' ? PLCMT.INTERSTITIAL : PLCMT.OUTSTREAM; } - //INSTREAM must be set to “sound on” by default at player start - return type === "inStream" && (!muted || !autoplay) ? PLCMT.INSTREAM : PLCMT.ACCOMPANYING_CONTENT; + // INSTREAM must be set to “sound on” by default at player start + return type === 'inStream' && (!muted || !autoplay) ? PLCMT.INSTREAM : PLCMT.ACCOMPANYING_CONTENT; } } diff --git a/test/spec/modules/videoModule/submodules/adplayerproVideoProvider_spec.js b/test/spec/modules/videoModule/submodules/adplayerproVideoProvider_spec.js index 32ed40d99f2..227e61494b6 100644 --- a/test/spec/modules/videoModule/submodules/adplayerproVideoProvider_spec.js +++ b/test/spec/modules/videoModule/submodules/adplayerproVideoProvider_spec.js @@ -420,15 +420,15 @@ describe('AdPlayerProProvider utils', function () { expect(utils.getPlcmt({type, autoplay, muted, file})).to.be.equal(expected); } - test("inStream", false, false, "f", PLCMT.INSTREAM); - test(undefined, false, false, "f", PLCMT.INSTREAM); - test("inStream", false, true, "f", PLCMT.INSTREAM); - test("inStream", true, false, "f", PLCMT.INSTREAM); - test("inStream", true, true, "f", PLCMT.ACCOMPANYING_CONTENT); - - test("rewarded", true, false, undefined, PLCMT.INTERSTITIAL); - test("inView", true, false, undefined, PLCMT.INTERSTITIAL); - test("InPage", true, false, undefined, PLCMT.OUTSTREAM); + test('inStream', false, false, 'f', PLCMT.INSTREAM); + test(undefined, false, false, 'f', PLCMT.INSTREAM); + test('inStream', false, true, 'f', PLCMT.INSTREAM); + test('inStream', true, false, 'f', PLCMT.INSTREAM); + test('inStream', true, true, 'f', PLCMT.ACCOMPANYING_CONTENT); + + test('rewarded', true, false, undefined, PLCMT.INTERSTITIAL); + test('inView', true, false, undefined, PLCMT.INTERSTITIAL); + test('InPage', true, false, undefined, PLCMT.OUTSTREAM); }); });