Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
redaguermas committed Apr 17, 2020
1 parent 2a7ee10 commit bb803ca
Showing 1 changed file with 19 additions and 21 deletions.
40 changes: 19 additions & 21 deletions test/spec/modules/nobidBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,20 @@ describe('Nobid Adapter', function () {
expect(spec.isBidRequestValid(bid)).to.equal(false);
});
});

describe('isVideoBidRequestValid', function () {
let bid = {
bidder: 'nobid',
params: {
siteId: 2,
video: {
skippable: true,
playback_methods: ['auto_play_sound_off'],
position: 'atf',
mimes: ['video/x-flv', 'video/mp4', 'video/x-ms-wmv', 'application/x-shockwave-flash', 'application/javascript'],
minduration: 1,
maxduration: 30,
frameworks: [1, 2, 3, 4, 5, 6]
skippable: true,
playback_methods: ['auto_play_sound_off'],
position: 'atf',
mimes: ['video/x-flv', 'video/mp4', 'video/x-ms-wmv', 'application/x-shockwave-flash', 'application/javascript'],
minduration: 1,
maxduration: 30,
frameworks: [1, 2, 3, 4, 5, 6]
}
},
adUnitCode: 'adunit-code',
Expand All @@ -71,10 +71,10 @@ describe('Nobid Adapter', function () {
bidderRequestId: '22edbae2733bf6',
auctionId: '1d1a030790a475',
mediaTypes: {
video: {
context: 'instream'
}
}
video: {
context: 'instream'
}
}
};
const SITE_ID = 2;
const REFERER = 'https://www.examplereferer.com';
Expand All @@ -91,7 +91,7 @@ describe('Nobid Adapter', function () {
minduration: 1,
maxduration: 30,
frameworks: [1, 2, 3, 4, 5, 6]
}
}
},
adUnitCode: 'adunit-code',
bidId: '30b31c1838de1e',
Expand All @@ -109,12 +109,10 @@ describe('Nobid Adapter', function () {
let bidderRequest = {
refererInfo: {referer: REFERER}
}

it('should add source and version to the tag', function () {
const request = spec.buildRequests(bidRequests, bidderRequest);
const payload = JSON.parse(request.data);
// eslint-disable-next-line
console.log(">>> REQUEST:", request.data);
expect(payload.sid).to.equal(SITE_ID);
expect(payload.l).to.exist.and.to.equal(encodeURIComponent(REFERER));
expect(payload.a).to.exist;
Expand All @@ -123,13 +121,13 @@ describe('Nobid Adapter', function () {
expect(payload.r).to.exist;
expect(payload.lang).to.exist;
expect(payload.ref).to.exist;
expect(payload.a[0].d).to.exist.and.to.equal("adunit-code");
expect(payload.a[0].at).to.exist.and.to.equal("video");
expect(payload.a[0].d).to.exist.and.to.equal('adunit-code');
expect(payload.a[0].at).to.exist.and.to.equal('video');
expect(payload.a[0].params.video).to.exist;
expect(payload.a[0].params.video.skippable).to.exist.and.to.equal(true);
expect(payload.a[0].params.video.playback_methods).to.exist.and.to.contain("auto_play_sound_off");
expect(payload.a[0].params.video.position).to.exist.and.to.equal("atf");
expect(payload.a[0].params.video.mimes).to.exist.and.to.contain("video/x-flv");
expect(payload.a[0].params.video.playback_methods).to.exist.and.to.contain('auto_play_sound_off');
expect(payload.a[0].params.video.position).to.exist.and.to.equal('atf');
expect(payload.a[0].params.video.mimes).to.exist.and.to.contain('video/x-flv');
expect(payload.a[0].params.video.minduration).to.exist.and.to.equal(1);
expect(payload.a[0].params.video.maxduration).to.exist.and.to.equal(30);
expect(payload.a[0].params.video.frameworks[0]).to.exist.and.to.equal(1);
Expand Down

0 comments on commit bb803ca

Please sign in to comment.