Skip to content

Commit

Permalink
tests re ortb
Browse files Browse the repository at this point in the history
  • Loading branch information
karimMourra committed Sep 29, 2022
1 parent a78f7ab commit e25c01a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions test/spec/modules/videoModule/pbVideo_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,14 +141,12 @@ describe('Prebid Video', function () {
test: 'contentTestValue'
}));

const setConfigSpy = pbGlobalMock.setConfig;
setConfigSpy.resetHistory();
let beforeBidRequestCallback;
const requestBids = {
before: callback_ => beforeBidRequestCallback = callback_
};

pbVideoFactory(null, null, Object.assign({}, pbGlobalMock, { requestBids, setConfig: setConfigSpy }));
pbVideoFactory(null, null, Object.assign({}, pbGlobalMock, { requestBids }));
expect(beforeBidRequestCallback).to.not.be.undefined;
const nextFn = sinon.spy();
const adUnits = [{
Expand All @@ -163,9 +161,8 @@ describe('Prebid Video', function () {
expect(getOrtbContentSpy.calledOnce).to.be.true;
const adUnit = adUnits[0];
expect(adUnit.mediaTypes.video).to.have.property('test', 'videoTestValue');
expect(setConfigSpy.calledOnce).to.be.true;
expect(setConfigSpy.getCall(0).args[0]).to.be.deep.equal({ ortb2: { site: { test: 'contentTestValue' } } });
expect(nextFn.calledOnce).to.be.true;
expect(nextFn.getCall(0).args[0].ortb2).to.be.deep.equal({ site: { test: 'contentTestValue' } });
});
});

Expand Down

0 comments on commit e25c01a

Please sign in to comment.