Skip to content

Commit

Permalink
uncomment todos
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaimin Panchal committed Feb 26, 2019
1 parent 17a5176 commit 0635c0f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
7 changes: 3 additions & 4 deletions modules/appnexusBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Renderer } from '../src/Renderer';
import * as utils from '../src/utils';
import { config } from '../src/config';
import { registerBidder } from '../src/adapters/bidderFactory';
import { registerBidder, getIabSubCategory } from '../src/adapters/bidderFactory';
import { BANNER, NATIVE, VIDEO, ADPOD } from '../src/mediaTypes';
import find from 'core-js/library/fn/array/find';
import includes from 'core-js/library/fn/array/includes';
Expand Down Expand Up @@ -360,10 +360,9 @@ function newBid(serverBid, rtbBid, bidderRequest) {

const videoContext = utils.deepAccess(bidRequest, 'mediaTypes.video.context');
if (videoContext === ADPOD) {
// TODO: uncomment and add to bid.meta after util function merged
// const iabSubCatId = getIabSubCategory(bidRequest.bidder, rtbBid.brand_category_id);
const iabSubCatId = getIabSubCategory(bidRequest.bidder, rtbBid.brand_category_id);
bid.meta = {
iabSubCatId: null,
iabSubCatId
};

bid.video = {
Expand Down
21 changes: 9 additions & 12 deletions test/spec/modules/appnexusBidAdapter_spec.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { expect } from 'chai';
import { spec } from 'modules/appnexusBidAdapter';
import { newBidder } from 'src/adapters/bidderFactory';
// TODO remove comment on merge
// import * as bidderFactory from 'src/adapters/bidderFactory';
import * as bidderFactory from 'src/adapters/bidderFactory';
import { deepClone } from 'src/utils';
import { config } from 'src/config';

Expand Down Expand Up @@ -600,15 +599,14 @@ describe('AppNexusAdapter', function () {
})

describe('interpretResponse', function () {
// TODO remove comments on merge
// let bfStub;
// before(function() {
// bfStub = sinon.stub(bidderFactory, 'getIabSubCategory');
// });
let bfStub;
before(function() {
bfStub = sinon.stub(bidderFactory, 'getIabSubCategory');
});

// after(function() {
// bfStub.restore();
// });
after(function() {
bfStub.restore();
});

let response = {
'version': '3.0.0',
Expand Down Expand Up @@ -759,8 +757,7 @@ describe('AppNexusAdapter', function () {
}
}]
};
// TODO remove on merge
// bfStub.returns('1');
bfStub.returns('1');

let result = spec.interpretResponse({ body: response }, {bidderRequest});
expect(result[0].video.context).to.equal('adpod');
Expand Down

0 comments on commit 0635c0f

Please sign in to comment.