diff --git a/test/spec/modules/s2sTesting_spec.js b/test/spec/modules/s2sTesting_spec.js index f829087a967..4ddd7278f4e 100644 --- a/test/spec/modules/s2sTesting_spec.js +++ b/test/spec/modules/s2sTesting_spec.js @@ -312,15 +312,15 @@ describe('s2sTesting', function () { const AST = CONSTANTS.JSON_MAPPING.ADSERVER_TARGETING; function checkTargeting(bidder) { - var targeting = window.pbjs.bidderSettings[bidder][AST]; + var targeting = window.$$PREBID_GLOBAL$$.bidderSettings[bidder][AST]; var srcTargeting = targeting[targeting.length - 1]; expect(srcTargeting.key).to.equal(`hb_source_${bidder}`); expect(srcTargeting.val).to.be.a('function'); - expect(window.pbjs.bidderSettings[bidder].alwaysUseBid).to.be.true; + expect(window.$$PREBID_GLOBAL$$.bidderSettings[bidder].alwaysUseBid).to.be.true; } function checkNoTargeting(bidder) { - var bs = window.pbjs.bidderSettings; + var bs = window.$$PREBID_GLOBAL$$.bidderSettings; var targeting = bs[bidder] && bs[bidder][AST]; if (!targeting) { expect(targeting).to.be.undefined; @@ -332,22 +332,22 @@ describe('s2sTesting', function () { } function checkTargetingVal(bidResponse, expectedVal) { - var targeting = window.pbjs.bidderSettings[bidResponse.bidderCode][AST]; + var targeting = window.$$PREBID_GLOBAL$$.bidderSettings[bidResponse.bidderCode][AST]; var targetingFunc = targeting[targeting.length - 1].val; expect(targetingFunc(bidResponse)).to.equal(expectedVal); } beforeEach(() => { // set bidderSettings - window.pbjs.bidderSettings = {}; + window.$$PREBID_GLOBAL$$.bidderSettings = {}; }); it('should not set hb_source_ unless testing is on and includeSourceKvp is set', () => { config.setConfig({s2sConfig: {bidders: ['rubicon', 'appnexus']}}); - expect(window.pbjs.bidderSettings).to.eql({}); + expect(window.$$PREBID_GLOBAL$$.bidderSettings).to.eql({}); config.setConfig({s2sConfig: {bidders: ['rubicon', 'appnexus'], testing: true}}); - expect(window.pbjs.bidderSettings).to.eql({}); + expect(window.$$PREBID_GLOBAL$$.bidderSettings).to.eql({}); config.setConfig({s2sConfig: { bidders: ['rubicon', 'appnexus'], @@ -357,7 +357,7 @@ describe('s2sTesting', function () { appnexus: {bidSource: {server: 1}} } }}); - expect(window.pbjs.bidderSettings).to.eql({}); + expect(window.$$PREBID_GLOBAL$$.bidderSettings).to.eql({}); config.setConfig({s2sConfig: { bidders: ['rubicon', 'appnexus'], @@ -367,7 +367,7 @@ describe('s2sTesting', function () { appnexus: {includeSourceKvp: true} } }}); - expect(window.pbjs.bidderSettings).to.eql({}); + expect(window.$$PREBID_GLOBAL$$.bidderSettings).to.eql({}); }); it('should set hb_source_ if includeSourceKvp is set', () => {