Skip to content

Commit

Permalink
All tests fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
jsadwith committed Mar 29, 2023
1 parent 15af9ef commit d4ca13d
Showing 1 changed file with 28 additions and 24 deletions.
52 changes: 28 additions & 24 deletions test/spec/modules/kargoBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,7 @@ describe('kargo adapter tests', function () {
user: {
kargoID: '5f108831-302d-11e7-bf6b-4595acd3bf6c',
clientID: '2410d8f2-c111-4811-88a5-7b5e190e475f',
// tdID: 'ed1562d5-e52b-406f-8e65-e5ab3ed5583c',
crbIDs: {
2: '82fa2555-5969-4614-b4ce-4dcf1080e9f9',
16: 'VoxIk8AoJz0AAEdCeyAAAAC2&502',
Expand All @@ -482,42 +483,44 @@ describe('kargo adapter tests', function () {
'2_93': '5ee24138-5e03-4b9d-a953-38e833f2849f'
},
optOut: false,
usp: '1---'
usp: '1---',
sharedIDEids: [
{
source: 'adserver.org',
uids: [
{
id: 'ed1562d5-e52b-406f-8e65-e5ab3ed5583c',
atype: 1,
ext: {
rtiPartner: 'TDID'
}
}
]
}
]
}
};

if (expectedGDPR) {
base.user['gdpr'] = expectedGDPR;
if (excludeUserIds) {
base.user.crbIDs = {};
delete base.user.clientID;
delete base.user.kargoID;
delete base.user.optOut;
}

base.user = {
crbIDs: {},
usp: '1---',
sharedIDEids: [
{
source: 'adserver.org',
uids: [
{
id: 'ed1562d5-e52b-406f-8e65-e5ab3ed5583c',
atype: 1,
ext: {
rtiPartner: 'TDID'
}
}
]
}
]
};
if (expectedGDPR) {
base.user.gdpr = expectedGDPR;
}

if (expectedPage) {
base.page = expectedPage;
}

if (currency) {
base.cur = currency
base.cur = currency;
}

const reqCount = requestCount++
const reqCount = requestCount++;
if (reqCount > 0) {
base.requestCount = reqCount
}
Expand All @@ -536,7 +539,8 @@ describe('kargo adapter tests', function () {

function testBuildRequests(excludeTdid, expected, gdpr) {
var clonedBids = JSON.parse(JSON.stringify(bids));
if (excludeTdid) {

if (excludeTdid && clonedBids[0].userId) {
delete clonedBids[0].userId.tdid;
}
var payload = {
Expand Down

0 comments on commit d4ca13d

Please sign in to comment.