prebid.js 6.1.0 → 6.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/browsers.json +13 -29
- package/karma.conf.maker.js +1 -1
- package/modules/admixerBidAdapter.js +2 -1
- package/modules/adnuntiusBidAdapter.js +2 -1
- package/modules/adplusBidAdapter.js +203 -0
- package/modules/adplusBidAdapter.md +39 -0
- package/modules/adyoulikeBidAdapter.js +7 -2
- package/modules/appnexusBidAdapter.js +19 -2
- package/modules/beachfrontBidAdapter.js +14 -17
- package/modules/craftBidAdapter.js +5 -3
- package/modules/dchain.js +149 -0
- package/modules/dchain.md +45 -0
- package/modules/emx_digitalBidAdapter.js +9 -1
- package/modules/freewheel-sspBidAdapter.js +6 -0
- package/modules/goldbachBidAdapter.js +1176 -0
- package/modules/goldbachBidAdapter.md +151 -0
- package/modules/gumgumBidAdapter.js +5 -1
- package/modules/intersectionRtdProvider.js +114 -0
- package/modules/invibesBidAdapter.js +15 -9
- package/modules/ipromBidAdapter.js +79 -0
- package/modules/limelightDigitalBidAdapter.js +2 -1
- package/modules/luponmediaBidAdapter.js +570 -0
- package/modules/missenaBidAdapter.js +89 -0
- package/modules/pubmaticBidAdapter.js +3 -3
- package/modules/relaidoBidAdapter.js +86 -65
- package/modules/richaudienceBidAdapter.js +1 -1
- package/modules/smaatoBidAdapter.js +4 -1
- package/modules/smartxBidAdapter.js +17 -1
- package/modules/tappxBidAdapter.js +3 -1
- package/modules/undertoneBidAdapter.js +8 -1
- package/modules/userId/index.js +27 -2
- package/modules/ventes.md +71 -0
- package/modules/ventesBidAdapter.js +104 -64
- package/modules/ventesBidAdapter.md +0 -1
- package/modules/visxBidAdapter.js +19 -2
- package/modules/visxBidAdapter.md +4 -6
- package/modules/yahoosspBidAdapter.md +1 -1
- package/modules/yieldoneBidAdapter.js +115 -11
- package/package.json +1 -1
- package/src/auction.js +3 -2
- package/src/targeting.js +2 -2
- package/src/utils.js +7 -0
- package/test/spec/integration/faker/googletag.js +6 -0
- package/test/spec/modules/adnuntiusBidAdapter_spec.js +18 -0
- package/test/spec/modules/adplusBidAdapter_spec.js +213 -0
- package/test/spec/modules/adyoulikeBidAdapter_spec.js +26 -0
- package/test/spec/modules/appnexusBidAdapter_spec.js +49 -1
- package/test/spec/modules/beachfrontBidAdapter_spec.js +65 -1
- package/test/spec/modules/dchain_spec.js +329 -0
- package/test/spec/modules/emx_digitalBidAdapter_spec.js +10 -0
- package/test/spec/modules/freewheel-sspBidAdapter_spec.js +19 -0
- package/test/spec/modules/goldbachBidAdapter_spec.js +1359 -0
- package/test/spec/modules/gumgumBidAdapter_spec.js +6 -0
- package/test/spec/modules/intersectionRtdProvider_spec.js +141 -0
- package/test/spec/modules/invibesBidAdapter_spec.js +29 -4
- package/test/spec/modules/ipromBidAdapter_spec.js +195 -0
- package/test/spec/modules/limelightDigitalBidAdapter_spec.js +10 -7
- package/test/spec/modules/luponmediaBidAdapter_spec.js +412 -0
- package/test/spec/modules/missenaBidAdapter_spec.js +134 -0
- package/test/spec/modules/pubmaticBidAdapter_spec.js +1 -1
- package/test/spec/modules/relaidoBidAdapter_spec.js +71 -63
- package/test/spec/modules/smaatoBidAdapter_spec.js +31 -0
- package/test/spec/modules/smartxBidAdapter_spec.js +9 -0
- package/test/spec/modules/tappxBidAdapter_spec.js +4 -0
- package/test/spec/modules/userId_spec.js +51 -0
- package/test/spec/modules/visxBidAdapter_spec.js +120 -4
- package/test/spec/modules/yieldoneBidAdapter_spec.js +299 -53
- package/test/spec/unit/core/targeting_spec.js +44 -0
|
@@ -7,6 +7,8 @@ const ENDPOINT = 'https://y.one.impact-ad.jp/h_bid';
|
|
|
7
7
|
const USER_SYNC_URL = 'https://y.one.impact-ad.jp/push_sync';
|
|
8
8
|
const VIDEO_PLAYER_URL = 'https://img.ak.impact-ad.jp/ic/pone/ivt/firstview/js/dac-video-prebid.min.js';
|
|
9
9
|
|
|
10
|
+
const DEFAULT_VIDEO_SIZE = {w: 640, h: 360};
|
|
11
|
+
|
|
10
12
|
describe('yieldoneBidAdapter', function() {
|
|
11
13
|
const adapter = newBidder(spec);
|
|
12
14
|
|
|
@@ -40,32 +42,7 @@ describe('yieldoneBidAdapter', function() {
|
|
|
40
42
|
});
|
|
41
43
|
|
|
42
44
|
describe('buildRequests', function () {
|
|
43
|
-
|
|
44
|
-
{
|
|
45
|
-
'bidder': 'yieldone',
|
|
46
|
-
'params': {
|
|
47
|
-
placementId: '36891'
|
|
48
|
-
},
|
|
49
|
-
'adUnitCode': 'adunit-code1',
|
|
50
|
-
'sizes': [[300, 250], [336, 280]],
|
|
51
|
-
'bidId': '23beaa6af6cdde',
|
|
52
|
-
'bidderRequestId': '19c0c1efdf37e7',
|
|
53
|
-
'auctionId': '61466567-d482-4a16-96f0-fe5f25ffbdf1',
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
'bidder': 'yieldone',
|
|
57
|
-
'params': {
|
|
58
|
-
placementId: '47919'
|
|
59
|
-
},
|
|
60
|
-
'adUnitCode': 'adunit-code2',
|
|
61
|
-
'sizes': [[300, 250]],
|
|
62
|
-
'bidId': '382091349b149f"',
|
|
63
|
-
'bidderRequestId': '"1f9c98192de251"',
|
|
64
|
-
'auctionId': '61466567-d482-4a16-96f0-fe5f25ffbdf1',
|
|
65
|
-
}
|
|
66
|
-
];
|
|
67
|
-
|
|
68
|
-
let bidderRequest = {
|
|
45
|
+
const bidderRequest = {
|
|
69
46
|
refererInfo: {
|
|
70
47
|
numIframes: 0,
|
|
71
48
|
reachedTop: true,
|
|
@@ -74,49 +51,318 @@ describe('yieldoneBidAdapter', function() {
|
|
|
74
51
|
}
|
|
75
52
|
};
|
|
76
53
|
|
|
77
|
-
|
|
54
|
+
describe('Basic', function () {
|
|
55
|
+
const bidRequests = [
|
|
56
|
+
{
|
|
57
|
+
'bidder': 'yieldone',
|
|
58
|
+
'params': {placementId: '36891'},
|
|
59
|
+
'adUnitCode': 'adunit-code1',
|
|
60
|
+
'bidId': '23beaa6af6cdde',
|
|
61
|
+
'bidderRequestId': '19c0c1efdf37e7',
|
|
62
|
+
'auctionId': '61466567-d482-4a16-96f0-fe5f25ffbdf1',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
'bidder': 'yieldone',
|
|
66
|
+
'params': {placementId: '47919'},
|
|
67
|
+
'adUnitCode': 'adunit-code2',
|
|
68
|
+
'bidId': '382091349b149f"',
|
|
69
|
+
'bidderRequestId': '"1f9c98192de251"',
|
|
70
|
+
'auctionId': '61466567-d482-4a16-96f0-fe5f25ffbdf1',
|
|
71
|
+
}
|
|
72
|
+
];
|
|
73
|
+
const request = spec.buildRequests(bidRequests, bidderRequest);
|
|
78
74
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
75
|
+
it('sends bid request to our endpoint via GET', function () {
|
|
76
|
+
expect(request[0].method).to.equal('GET');
|
|
77
|
+
expect(request[1].method).to.equal('GET');
|
|
78
|
+
});
|
|
79
|
+
it('attaches source and version to endpoint URL as query params', function () {
|
|
80
|
+
expect(request[0].url).to.equal(ENDPOINT);
|
|
81
|
+
expect(request[1].url).to.equal(ENDPOINT);
|
|
82
|
+
});
|
|
83
|
+
it('adUnitCode should be sent as uc parameters on any requests', function () {
|
|
84
|
+
expect(request[0].data.uc).to.equal('adunit-code1');
|
|
85
|
+
expect(request[1].data.uc).to.equal('adunit-code2');
|
|
86
|
+
});
|
|
82
87
|
});
|
|
83
88
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
89
|
+
describe('Old Format', function () {
|
|
90
|
+
const bidRequests = [
|
|
91
|
+
{
|
|
92
|
+
params: {placementId: '0'},
|
|
93
|
+
mediaType: 'banner',
|
|
94
|
+
sizes: [[300, 250], [336, 280]],
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
params: {placementId: '1'},
|
|
98
|
+
mediaType: 'banner',
|
|
99
|
+
sizes: [[336, 280]],
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
// It doesn't actually exist.
|
|
103
|
+
params: {placementId: '2'},
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
params: {placementId: '3'},
|
|
107
|
+
mediaType: 'video',
|
|
108
|
+
sizes: [[1280, 720], [1920, 1080]],
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
params: {placementId: '4'},
|
|
112
|
+
mediaType: 'video',
|
|
113
|
+
sizes: [[1920, 1080]],
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
params: {placementId: '5'},
|
|
117
|
+
mediaType: 'video',
|
|
118
|
+
},
|
|
119
|
+
];
|
|
120
|
+
const request = spec.buildRequests(bidRequests, bidderRequest);
|
|
88
121
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
122
|
+
it('parameter sz has more than one size on banner requests', function () {
|
|
123
|
+
expect(request[0].data.sz).to.equal('300x250,336x280');
|
|
124
|
+
expect(request[1].data.sz).to.equal('336x280');
|
|
125
|
+
expect(request[2].data.sz).to.equal('');
|
|
126
|
+
expect(request[3].data).to.not.have.property('sz');
|
|
127
|
+
expect(request[4].data).to.not.have.property('sz');
|
|
128
|
+
expect(request[5].data).to.not.have.property('sz');
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
it('width and height should be set as separate parameters on outstream requests', function () {
|
|
132
|
+
expect(request[0].data).to.not.have.property('w');
|
|
133
|
+
expect(request[1].data).to.not.have.property('w');
|
|
134
|
+
expect(request[2].data).to.not.have.property('w');
|
|
135
|
+
expect(request[3].data.w).to.equal(1280);
|
|
136
|
+
expect(request[3].data.h).to.equal(720);
|
|
137
|
+
expect(request[4].data.w).to.equal(1920);
|
|
138
|
+
expect(request[4].data.h).to.equal(1080);
|
|
139
|
+
expect(request[5].data.w).to.equal(DEFAULT_VIDEO_SIZE.w);
|
|
140
|
+
expect(request[5].data.h).to.equal(DEFAULT_VIDEO_SIZE.h);
|
|
141
|
+
});
|
|
92
142
|
});
|
|
93
143
|
|
|
94
|
-
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
144
|
+
describe('New Format', function () {
|
|
145
|
+
const bidRequests = [
|
|
146
|
+
{
|
|
147
|
+
params: {placementId: '0'},
|
|
148
|
+
mediaTypes: {
|
|
149
|
+
banner: {
|
|
150
|
+
sizes: [[300, 250], [336, 280]],
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
params: {placementId: '1'},
|
|
156
|
+
mediaTypes: {
|
|
157
|
+
banner: {
|
|
158
|
+
sizes: [[336, 280]],
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
// It doesn't actually exist.
|
|
164
|
+
params: {placementId: '2'},
|
|
165
|
+
mediaTypes: {
|
|
166
|
+
banner: {
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
params: {placementId: '3'},
|
|
172
|
+
mediaTypes: {
|
|
173
|
+
video: {
|
|
174
|
+
context: 'outstream',
|
|
175
|
+
playerSize: [[1280, 720], [1920, 1080]],
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
params: {placementId: '4'},
|
|
181
|
+
mediaTypes: {
|
|
182
|
+
video: {
|
|
183
|
+
context: 'outstream',
|
|
184
|
+
playerSize: [1920, 1080],
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
params: {placementId: '5'},
|
|
190
|
+
mediaTypes: {
|
|
191
|
+
video: {
|
|
192
|
+
context: 'outstream',
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
];
|
|
197
|
+
const request = spec.buildRequests(bidRequests, bidderRequest);
|
|
198
|
+
|
|
199
|
+
it('parameter sz has more than one size on banner requests', function () {
|
|
200
|
+
expect(request[0].data.sz).to.equal('300x250,336x280');
|
|
201
|
+
expect(request[1].data.sz).to.equal('336x280');
|
|
202
|
+
expect(request[2].data.sz).to.equal('');
|
|
203
|
+
expect(request[3].data).to.not.have.property('sz');
|
|
204
|
+
expect(request[4].data).to.not.have.property('sz');
|
|
205
|
+
expect(request[5].data).to.not.have.property('sz');
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
it('width and height should be set as separate parameters on outstream requests', function () {
|
|
209
|
+
expect(request[0].data).to.not.have.property('w');
|
|
210
|
+
expect(request[1].data).to.not.have.property('w');
|
|
211
|
+
expect(request[2].data).to.not.have.property('w');
|
|
212
|
+
expect(request[3].data.w).to.equal(1280);
|
|
213
|
+
expect(request[3].data.h).to.equal(720);
|
|
214
|
+
expect(request[4].data.w).to.equal(1920);
|
|
215
|
+
expect(request[4].data.h).to.equal(1080);
|
|
216
|
+
expect(request[5].data.w).to.equal(DEFAULT_VIDEO_SIZE.w);
|
|
217
|
+
expect(request[5].data.h).to.equal(DEFAULT_VIDEO_SIZE.h);
|
|
218
|
+
});
|
|
101
219
|
});
|
|
102
220
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
221
|
+
describe('Multiple Format', function () {
|
|
222
|
+
const bidRequests = [
|
|
223
|
+
{
|
|
224
|
+
// It will be treated as a banner.
|
|
225
|
+
params: {
|
|
226
|
+
placementId: '0',
|
|
227
|
+
},
|
|
228
|
+
mediaTypes: {
|
|
229
|
+
banner: {
|
|
230
|
+
sizes: [[300, 250], [336, 280]],
|
|
231
|
+
},
|
|
232
|
+
video: {
|
|
233
|
+
context: 'outstream',
|
|
234
|
+
playerSize: [1920, 1080],
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
// It will be treated as a video.
|
|
240
|
+
params: {
|
|
241
|
+
placementId: '1',
|
|
242
|
+
playerParams: {},
|
|
243
|
+
},
|
|
244
|
+
mediaTypes: {
|
|
245
|
+
banner: {
|
|
246
|
+
sizes: [[300, 250], [336, 280]],
|
|
247
|
+
},
|
|
248
|
+
video: {
|
|
249
|
+
context: 'outstream',
|
|
250
|
+
playerSize: [1920, 1080],
|
|
251
|
+
},
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
];
|
|
255
|
+
const request = spec.buildRequests(bidRequests, bidderRequest);
|
|
256
|
+
|
|
257
|
+
it('parameter sz has more than one size on banner requests', function () {
|
|
258
|
+
expect(request[0].data.sz).to.equal('300x250,336x280');
|
|
259
|
+
expect(request[1].data).to.not.have.property('sz');
|
|
260
|
+
});
|
|
261
|
+
|
|
262
|
+
it('width and height should be set as separate parameters on outstream requests', function () {
|
|
263
|
+
expect(request[0].data).to.not.have.property('w');
|
|
264
|
+
expect(request[1].data.w).to.equal(1920);
|
|
265
|
+
expect(request[1].data.h).to.equal(1080);
|
|
266
|
+
});
|
|
106
267
|
});
|
|
107
268
|
|
|
108
|
-
describe('
|
|
109
|
-
const
|
|
269
|
+
describe('FLUX Format', function () {
|
|
270
|
+
const bidRequests = [
|
|
271
|
+
{
|
|
272
|
+
// It will be treated as a banner.
|
|
273
|
+
params: {
|
|
274
|
+
placementId: '0',
|
|
275
|
+
},
|
|
276
|
+
mediaTypes: {
|
|
277
|
+
banner: {
|
|
278
|
+
sizes: [[300, 250], [336, 280]],
|
|
279
|
+
},
|
|
280
|
+
video: {
|
|
281
|
+
context: 'outstream',
|
|
282
|
+
playerSize: [[1, 1]],
|
|
283
|
+
},
|
|
284
|
+
},
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
// It will be treated as a video.
|
|
288
|
+
params: {
|
|
289
|
+
placementId: '1',
|
|
290
|
+
playerParams: {},
|
|
291
|
+
playerSize: [1920, 1080],
|
|
292
|
+
},
|
|
293
|
+
mediaTypes: {
|
|
294
|
+
banner: {
|
|
295
|
+
sizes: [[300, 250], [336, 280]],
|
|
296
|
+
},
|
|
297
|
+
video: {
|
|
298
|
+
context: 'outstream',
|
|
299
|
+
playerSize: [[1, 1]],
|
|
300
|
+
},
|
|
301
|
+
},
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
// It will be treated as a video.
|
|
305
|
+
params: {
|
|
306
|
+
placementId: '2',
|
|
307
|
+
playerParams: {},
|
|
308
|
+
},
|
|
309
|
+
mediaTypes: {
|
|
310
|
+
banner: {
|
|
311
|
+
sizes: [[300, 250], [336, 280]],
|
|
312
|
+
},
|
|
313
|
+
video: {
|
|
314
|
+
context: 'outstream',
|
|
315
|
+
playerSize: [[1, 1]],
|
|
316
|
+
},
|
|
317
|
+
},
|
|
318
|
+
},
|
|
319
|
+
];
|
|
320
|
+
const request = spec.buildRequests(bidRequests, bidderRequest);
|
|
321
|
+
|
|
322
|
+
it('parameter sz has more than one size on banner requests', function () {
|
|
323
|
+
expect(request[0].data.sz).to.equal('300x250,336x280');
|
|
324
|
+
expect(request[1].data).to.not.have.property('sz');
|
|
325
|
+
expect(request[2].data).to.not.have.property('sz');
|
|
326
|
+
});
|
|
327
|
+
|
|
328
|
+
it('width and height should be set as separate parameters on outstream requests', function () {
|
|
329
|
+
expect(request[0].data).to.not.have.property('w');
|
|
330
|
+
expect(request[1].data.w).to.equal(1920);
|
|
331
|
+
expect(request[1].data.h).to.equal(1080);
|
|
332
|
+
expect(request[2].data.w).to.equal(DEFAULT_VIDEO_SIZE.w);
|
|
333
|
+
expect(request[2].data.h).to.equal(DEFAULT_VIDEO_SIZE.h);
|
|
334
|
+
});
|
|
335
|
+
});
|
|
110
336
|
|
|
337
|
+
describe('LiveRampID', function () {
|
|
111
338
|
it('dont send LiveRampID if undefined', function () {
|
|
112
|
-
|
|
113
|
-
|
|
339
|
+
const bidRequests = [
|
|
340
|
+
{
|
|
341
|
+
params: {placementId: '0'},
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
params: {placementId: '1'},
|
|
345
|
+
userId: {},
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
params: {placementId: '2'},
|
|
349
|
+
userId: undefined,
|
|
350
|
+
},
|
|
351
|
+
];
|
|
352
|
+
const request = spec.buildRequests(bidRequests, bidderRequest);
|
|
114
353
|
expect(request[0].data).to.not.have.property('lr_env');
|
|
354
|
+
expect(request[1].data).to.not.have.property('lr_env');
|
|
355
|
+
expect(request[2].data).to.not.have.property('lr_env');
|
|
115
356
|
});
|
|
116
357
|
|
|
117
358
|
it('should send LiveRampID if available', function () {
|
|
118
|
-
|
|
119
|
-
|
|
359
|
+
const bidRequests = [
|
|
360
|
+
{
|
|
361
|
+
params: {placementId: '0'},
|
|
362
|
+
userId: {idl_env: 'idl_env_sample'},
|
|
363
|
+
},
|
|
364
|
+
];
|
|
365
|
+
const request = spec.buildRequests(bidRequests, bidderRequest);
|
|
120
366
|
expect(request[0].data.lr_env).to.equal('idl_env_sample');
|
|
121
367
|
});
|
|
122
368
|
});
|
|
@@ -461,6 +461,50 @@ describe('targeting tests', function () {
|
|
|
461
461
|
});
|
|
462
462
|
});
|
|
463
463
|
|
|
464
|
+
describe('targetingControls.allowZeroCpmBids', function () {
|
|
465
|
+
let bid4;
|
|
466
|
+
let bidderSettingsStorage;
|
|
467
|
+
|
|
468
|
+
before(function() {
|
|
469
|
+
bidderSettingsStorage = $$PREBID_GLOBAL$$.bidderSettings;
|
|
470
|
+
});
|
|
471
|
+
|
|
472
|
+
beforeEach(function () {
|
|
473
|
+
bid4 = utils.deepClone(bid1);
|
|
474
|
+
bid4.adserverTargeting = {
|
|
475
|
+
hb_pb: '0.0',
|
|
476
|
+
hb_adid: '567891011',
|
|
477
|
+
hb_bidder: 'appnexus',
|
|
478
|
+
};
|
|
479
|
+
bid4.bidder = bid4.bidderCode = 'appnexus';
|
|
480
|
+
bid4.cpm = 0;
|
|
481
|
+
bidsReceived = [bid4];
|
|
482
|
+
});
|
|
483
|
+
|
|
484
|
+
after(function() {
|
|
485
|
+
bidsReceived = [bid1, bid2, bid3];
|
|
486
|
+
$$PREBID_GLOBAL$$.bidderSettings = bidderSettingsStorage;
|
|
487
|
+
})
|
|
488
|
+
|
|
489
|
+
it('targeting should not include a 0 cpm by default', function() {
|
|
490
|
+
bid4.adserverTargeting = {};
|
|
491
|
+
const targeting = targetingInstance.getAllTargeting(['/123456/header-bid-tag-0']);
|
|
492
|
+
expect(targeting['/123456/header-bid-tag-0']).to.deep.equal({});
|
|
493
|
+
});
|
|
494
|
+
|
|
495
|
+
it('targeting should allow a 0 cpm with targetingControls.allowZeroCpmBids set to true', function () {
|
|
496
|
+
$$PREBID_GLOBAL$$.bidderSettings = {
|
|
497
|
+
standard: {
|
|
498
|
+
allowZeroCpmBids: true
|
|
499
|
+
}
|
|
500
|
+
};
|
|
501
|
+
|
|
502
|
+
const targeting = targetingInstance.getAllTargeting(['/123456/header-bid-tag-0']);
|
|
503
|
+
expect(targeting['/123456/header-bid-tag-0']).to.include.all.keys('hb_pb', 'hb_bidder', 'hb_adid', 'hb_bidder_appnexus', 'hb_adid_appnexus', 'hb_pb_appnexus');
|
|
504
|
+
expect(targeting['/123456/header-bid-tag-0']['hb_pb']).to.equal('0.0')
|
|
505
|
+
});
|
|
506
|
+
});
|
|
507
|
+
|
|
464
508
|
describe('targetingControls.allowTargetingKeys', function () {
|
|
465
509
|
let bid4;
|
|
466
510
|
|