Skip to content

Commit

Permalink
remove pubCommonId import from emoteevBidAdapter
Browse files Browse the repository at this point in the history
  • Loading branch information
snapwich authored and piotr-yuxuan committed Jun 21, 2019
1 parent 0f8cb9b commit 36f93c0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
4 changes: 2 additions & 2 deletions modules/emoteevBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ import {
contains,
deepAccess,
isArray,
getParameterByName
getParameterByName,
getCookie
} from '../src/utils';
import {config} from '../src/config';
import * as url from '../src/url';
import {getCookie} from './pubCommonId';

export const BIDDER_CODE = 'emoteev';

Expand Down
17 changes: 8 additions & 9 deletions test/spec/modules/emoteevBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ import {
} from 'modules/emoteevBidAdapter';
import * as url from '../../../src/url';
import * as utils from '../../../src/utils';
import * as pubCommonId from '../../../modules/pubCommonId';
import {config} from '../../../src/config';

const cannedValidBidRequests = [{
Expand Down Expand Up @@ -743,7 +742,7 @@ describe('emoteevBidAdapter', function () {
let getParameterByNameSpy;
beforeEach(function () {
triggerPixelSpy = sinon.spy(utils, 'triggerPixel');
getCookieSpy = sinon.spy(pubCommonId, 'getCookie');
getCookieSpy = sinon.spy(utils, 'getCookie');
getConfigSpy = sinon.spy(config, 'getConfig');
getParameterByNameSpy = sinon.spy(utils, 'getParameterByName');
});
Expand All @@ -770,15 +769,15 @@ describe('emoteevBidAdapter', function () {
};
spec.isBidRequestValid(validBidRequest);
sinon.assert.notCalled(utils.triggerPixel);
sinon.assert.notCalled(pubCommonId.getCookie);
sinon.assert.notCalled(utils.getCookie);
sinon.assert.notCalled(config.getConfig);
sinon.assert.notCalled(utils.getParameterByName);
});
it('has intended side-effects', function () {
const invalidBidRequest = {};
spec.isBidRequestValid(invalidBidRequest);
sinon.assert.notCalled(utils.triggerPixel);
sinon.assert.notCalled(pubCommonId.getCookie);
sinon.assert.notCalled(utils.getCookie);
sinon.assert.notCalled(config.getConfig);
sinon.assert.notCalled(utils.getParameterByName);
});
Expand All @@ -787,7 +786,7 @@ describe('emoteevBidAdapter', function () {
it('has intended side-effects', function () {
spec.buildRequests(cannedValidBidRequests, cannedBidderRequest);
sinon.assert.notCalled(utils.triggerPixel);
sinon.assert.notCalled(pubCommonId.getCookie);
sinon.assert.notCalled(utils.getCookie);
sinon.assert.callCount(config.getConfig, 3);
sinon.assert.callCount(utils.getParameterByName, 2);
});
Expand All @@ -796,7 +795,7 @@ describe('emoteevBidAdapter', function () {
it('has intended side-effects', function () {
spec.interpretResponse(serverResponse);
sinon.assert.notCalled(utils.triggerPixel);
sinon.assert.notCalled(pubCommonId.getCookie);
sinon.assert.notCalled(utils.getCookie);
sinon.assert.notCalled(config.getConfig);
sinon.assert.notCalled(utils.getParameterByName);
});
Expand All @@ -806,7 +805,7 @@ describe('emoteevBidAdapter', function () {
const bidObject = serverResponse.body[0];
spec.onBidWon(bidObject);
sinon.assert.calledOnce(utils.triggerPixel);
sinon.assert.calledOnce(pubCommonId.getCookie);
sinon.assert.calledOnce(utils.getCookie);
sinon.assert.calledOnce(config.getConfig);
sinon.assert.calledOnce(utils.getParameterByName);
});
Expand All @@ -815,7 +814,7 @@ describe('emoteevBidAdapter', function () {
it('has intended side-effects', function () {
spec.onTimeout(cannedValidBidRequests[0]);
sinon.assert.calledOnce(utils.triggerPixel);
sinon.assert.notCalled(pubCommonId.getCookie);
sinon.assert.notCalled(utils.getCookie);
sinon.assert.calledOnce(config.getConfig);
sinon.assert.calledOnce(utils.getParameterByName);
});
Expand All @@ -824,7 +823,7 @@ describe('emoteevBidAdapter', function () {
it('has intended side-effects', function () {
spec.getUserSyncs({});
sinon.assert.notCalled(utils.triggerPixel);
sinon.assert.notCalled(pubCommonId.getCookie);
sinon.assert.notCalled(utils.getCookie);
sinon.assert.calledOnce(config.getConfig);
sinon.assert.calledOnce(utils.getParameterByName);
});
Expand Down

0 comments on commit 36f93c0

Please sign in to comment.