Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Skitelman committed May 21, 2024
1 parent a215d26 commit 76a65da
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions test/spec/modules/concertBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,31 @@ describe('ConcertAdapter', function () {
const payload = JSON.parse(request.data);
expect(payload.meta.tdid).to.equal(tdid);
});

it('should return null if schain object is not present', function () {
const request = spec.buildRequests(bidRequests, bidRequest);
const payload = JSON.parse(request.data);
expect(payload.meta.schain).to.be.null;
});

it('should pass along schain object if present', function () {
const schain = {
ver: '1.0',
complete: 1,
nodes: [
{
asi: 'directseller.com',
sid: '00001',
rid: 'BidRequest1',
hp: 1,
},
],
};
const bidRequestsWithSchain = [{ ...bidRequests[0], schain }]
const request = spec.buildRequests(bidRequestsWithSchain, bidRequest);
const payload = JSON.parse(request.data);
expect(payload.meta.schain).to.deep.equal(schain);
});
});

describe('spec.interpretResponse', function() {
Expand Down

0 comments on commit 76a65da

Please sign in to comment.