Skip to content

Commit

Permalink
add a realistic schain object in the unit test (prebid#9077)
Browse files Browse the repository at this point in the history
  • Loading branch information
ybootin authored and jorgeluisrocha committed May 18, 2023
1 parent 6aca7ff commit 35cb050
Showing 1 changed file with 15 additions and 18 deletions.
33 changes: 15 additions & 18 deletions test/spec/modules/seedtagBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,28 +361,25 @@ describe('Seedtag Adapter', function () {
it('should add schain to payload when exposed on validBidRequest', function () {
// https://github.com/prebid/Prebid.js/blob/master/modules/schain.md#sample-code-for-passing-the-schain-object
const schain = {
validation: 'strict',
config: {
ver: '1.0',
complete: 1,
nodes: [
{
asi: 'indirectseller.com',
sid: '00001',
hp: 1,
},
ver: '1.0',
complete: 1,
nodes: [
{
asi: 'indirectseller.com',
sid: '00001',
hp: 1,
},

{
asi: 'indirectseller-2.com',
sid: '00002',
hp: 1,
},
],
},
{
asi: 'indirectseller-2.com',
sid: '00002',
hp: 1,
},
],
};

// duplicate
const bidRequests = JSON.parse(JSON.stringify(validBidRequests))
const bidRequests = JSON.parse(JSON.stringify(validBidRequests));
bidRequests[0].schain = schain;

const request = spec.buildRequests(bidRequests, bidderRequest);
Expand Down

0 comments on commit 35cb050

Please sign in to comment.