prebid.js 7.49.0 → 7.51.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.
Files changed (213) hide show
  1. package/dist/33acrossBidAdapter.js +1 -1
  2. package/dist/33acrossIdSystem.js +1 -1
  3. package/dist/adagioBidAdapter.js +1 -1
  4. package/dist/adbookpspBidAdapter.js +1 -1
  5. package/dist/adgenerationBidAdapter.js +1 -1
  6. package/dist/adhashBidAdapter.js +1 -1
  7. package/dist/adkernelBidAdapter.js +1 -1
  8. package/dist/admanBidAdapter.js +1 -1
  9. package/dist/adnuntiusBidAdapter.js +1 -1
  10. package/dist/adqueryBidAdapter.js +1 -1
  11. package/dist/adrelevantisBidAdapter.js +1 -1
  12. package/dist/adrinoBidAdapter.js +1 -1
  13. package/dist/adtelligentBidAdapter.js +1 -1
  14. package/dist/adtrgtmeBidAdapter.js +1 -1
  15. package/dist/adxcgBidAdapter.js +1 -1
  16. package/dist/adyoulikeBidAdapter.js +1 -1
  17. package/dist/ajaBidAdapter.js +1 -1
  18. package/dist/amxBidAdapter.js +1 -1
  19. package/dist/amxIdSystem.js +1 -1
  20. package/dist/appierAnalyticsAdapter.js +1 -1
  21. package/dist/appnexusBidAdapter.js +1 -1
  22. package/dist/asoBidAdapter.js +1 -1
  23. package/dist/axonixBidAdapter.js +1 -1
  24. package/dist/beopBidAdapter.js +1 -1
  25. package/dist/bidglassBidAdapter.js +1 -1
  26. package/dist/big-richmediaBidAdapter.js +1 -1
  27. package/dist/bridgewellBidAdapter.js +1 -1
  28. package/dist/brightMountainMediaBidAdapter.js +1 -1
  29. package/dist/carodaBidAdapter.js +1 -1
  30. package/dist/chtnwBidAdapter.js +1 -1
  31. package/dist/cleanioRtdProvider.js +1 -1
  32. package/dist/concertBidAdapter.js +1 -1
  33. package/dist/confiantRtdProvider.js +1 -1
  34. package/dist/connectadBidAdapter.js +1 -1
  35. package/dist/consumableBidAdapter.js +1 -1
  36. package/dist/conversantAnalyticsAdapter.js +1 -1
  37. package/dist/conversantBidAdapter.js +1 -1
  38. package/dist/craftBidAdapter.js +1 -1
  39. package/dist/criteoBidAdapter.js +1 -1
  40. package/dist/cwireBidAdapter.js +1 -1
  41. package/dist/dependencies.json +3 -0
  42. package/dist/dspxBidAdapter.js +1 -1
  43. package/dist/eplanningBidAdapter.js +1 -1
  44. package/dist/feedadBidAdapter.js +1 -1
  45. package/dist/finativeBidAdapter.js +1 -1
  46. package/dist/freewheel-sspBidAdapter.js +1 -1
  47. package/dist/glimpseBidAdapter.js +1 -1
  48. package/dist/gmosspBidAdapter.js +1 -1
  49. package/dist/goldbachBidAdapter.js +1 -1
  50. package/dist/greenbidsAnalyticsAdapter.js +1 -1
  51. package/dist/greenbidsRtdProvider.js +1 -1
  52. package/dist/gridBidAdapter.js +1 -1
  53. package/dist/gumgumBidAdapter.js +1 -1
  54. package/dist/h12mediaBidAdapter.js +1 -1
  55. package/dist/id5IdSystem.js +1 -1
  56. package/dist/improvedigitalBidAdapter.js +1 -1
  57. package/dist/inmarBidAdapter.js +1 -1
  58. package/dist/insticatorBidAdapter.js +1 -1
  59. package/dist/ixBidAdapter.js +1 -1
  60. package/dist/justpremiumBidAdapter.js +1 -1
  61. package/dist/kargoBidAdapter.js +1 -1
  62. package/dist/konduitAnalyticsAdapter.js +1 -1
  63. package/dist/kueezBidAdapter.js +1 -1
  64. package/dist/kueezRtbBidAdapter.js +1 -1
  65. package/dist/kulturemediaBidAdapter.js +1 -1
  66. package/dist/lassoBidAdapter.js +1 -1
  67. package/dist/lifestreetBidAdapter.js +1 -1
  68. package/dist/liveIntentIdSystem.js +1 -1
  69. package/dist/liveyieldAnalyticsAdapter.js +1 -1
  70. package/dist/logicadBidAdapter.js +1 -1
  71. package/dist/loglyliftBidAdapter.js +1 -1
  72. package/dist/magniteAnalyticsAdapter.js +1 -1
  73. package/dist/malltvAnalyticsAdapter.js +1 -1
  74. package/dist/marsmediaBidAdapter.js +1 -1
  75. package/dist/mediafuseBidAdapter.js +1 -1
  76. package/dist/mediasquareBidAdapter.js +1 -1
  77. package/dist/mgidBidAdapter.js +1 -1
  78. package/dist/minutemediaBidAdapter.js +1 -1
  79. package/dist/minutemediaplusBidAdapter.js +1 -1
  80. package/dist/nexx360BidAdapter.js +1 -1
  81. package/dist/not-for-prod/prebid.js +140 -139
  82. package/dist/oguryBidAdapter.js +1 -1
  83. package/dist/onetagBidAdapter.js +1 -1
  84. package/dist/ooloAnalyticsAdapter.js +1 -1
  85. package/dist/optidigitalBidAdapter.js +1 -1
  86. package/dist/outbrainBidAdapter.js +1 -1
  87. package/dist/parrableIdSystem.js +1 -1
  88. package/dist/permutiveRtdProvider.js +1 -1
  89. package/dist/pixfutureBidAdapter.js +1 -1
  90. package/dist/prebid-core.js +1 -1
  91. package/dist/prebidServerBidAdapter.js +1 -1
  92. package/dist/publinkIdSystem.js +1 -1
  93. package/dist/pubmaticBidAdapter.js +1 -1
  94. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  95. package/dist/pxyzBidAdapter.js +1 -1
  96. package/dist/quantcastBidAdapter.js +1 -1
  97. package/dist/readpeakBidAdapter.js +1 -1
  98. package/dist/relaidoBidAdapter.js +1 -1
  99. package/dist/retailspotBidAdapter.js +1 -1
  100. package/dist/rhythmoneBidAdapter.js +1 -1
  101. package/dist/riseBidAdapter.js +1 -1
  102. package/dist/rubiconAnalyticsAdapter.js +1 -1
  103. package/dist/rubiconBidAdapter.js +1 -1
  104. package/dist/seedingAllianceBidAdapter.js +1 -1
  105. package/dist/seedtagBidAdapter.js +1 -1
  106. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  107. package/dist/sharethroughBidAdapter.js +1 -1
  108. package/dist/shinezBidAdapter.js +1 -1
  109. package/dist/silverpushBidAdapter.js +1 -0
  110. package/dist/smaatoBidAdapter.js +1 -1
  111. package/dist/smartadserverBidAdapter.js +1 -1
  112. package/dist/smartxBidAdapter.js +1 -1
  113. package/dist/smilewantedBidAdapter.js +1 -1
  114. package/dist/sonobiBidAdapter.js +1 -1
  115. package/dist/sovrnAnalyticsAdapter.js +1 -1
  116. package/dist/sovrnBidAdapter.js +1 -1
  117. package/dist/sspBCBidAdapter.js +1 -1
  118. package/dist/stvBidAdapter.js +1 -1
  119. package/dist/sublimeBidAdapter.js +1 -1
  120. package/dist/synacormediaBidAdapter.js +1 -1
  121. package/dist/targetVideoBidAdapter.js +1 -1
  122. package/dist/teadsBidAdapter.js +1 -1
  123. package/dist/trionBidAdapter.js +1 -1
  124. package/dist/tripleliftBidAdapter.js +1 -1
  125. package/dist/ttdBidAdapter.js +1 -1
  126. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  127. package/dist/uid2IdSystem.js +1 -1
  128. package/dist/underdogmediaBidAdapter.js +1 -1
  129. package/dist/undertoneBidAdapter.js +1 -1
  130. package/dist/vidazooBidAdapter.js +1 -1
  131. package/dist/video.js +1 -1
  132. package/dist/videoModule.js +1 -1
  133. package/dist/videobyteBidAdapter.js +1 -1
  134. package/dist/visxBidAdapter.js +1 -1
  135. package/dist/vuukleBidAdapter.js +1 -1
  136. package/dist/widespaceBidAdapter.js +1 -1
  137. package/dist/winrBidAdapter.js +1 -1
  138. package/dist/yahoosspBidAdapter.js +1 -1
  139. package/dist/yieldmoBidAdapter.js +1 -1
  140. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  141. package/integrationExamples/videoModule/eventsUI/eventsUI.css +205 -0
  142. package/integrationExamples/videoModule/eventsUI/eventsUI.js +181 -0
  143. package/integrationExamples/videoModule/jwplayer/eventsUI.html +295 -0
  144. package/integrationExamples/videoModule/videojs/eventsUI.html +319 -0
  145. package/libraries/video/shared/helpers.js +14 -0
  146. package/modules/33acrossBidAdapter.js +1 -1
  147. package/modules/adhashBidAdapter.js +28 -17
  148. package/modules/adkernelBidAdapter.js +2 -1
  149. package/modules/admanBidAdapter.js +30 -22
  150. package/modules/adnuntiusBidAdapter.js +98 -79
  151. package/modules/adnuntiusBidAdapter.md +2 -1
  152. package/modules/adqueryBidAdapter.js +7 -1
  153. package/modules/adrinoBidAdapter.js +1 -0
  154. package/modules/adtelligentBidAdapter.js +4 -2
  155. package/modules/appnexusBidAdapter.js +2 -0
  156. package/modules/beopBidAdapter.js +1 -0
  157. package/modules/cleanioRtdProvider.js +2 -4
  158. package/modules/confiantRtdProvider.js +15 -12
  159. package/modules/conversantAnalyticsAdapter.js +7 -5
  160. package/modules/conversantBidAdapter.js +1 -1
  161. package/modules/criteoBidAdapter.js +58 -4
  162. package/modules/freewheel-sspBidAdapter.js +10 -2
  163. package/modules/gridBidAdapter.js +3 -0
  164. package/modules/gumgumBidAdapter.js +5 -0
  165. package/modules/liveIntentIdSystem.js +8 -4
  166. package/modules/magniteAnalyticsAdapter.js +26 -3
  167. package/modules/minutemediaBidAdapter.js +13 -3
  168. package/modules/permutiveRtdProvider.js +9 -38
  169. package/modules/prebidServerBidAdapter/index.js +7 -8
  170. package/modules/pubmaticBidAdapter.js +1 -0
  171. package/modules/riseBidAdapter.js +13 -3
  172. package/modules/rtbhouseBidAdapter.md +24 -0
  173. package/modules/rubiconBidAdapter.js +6 -2
  174. package/modules/silverpushBidAdapter.js +326 -0
  175. package/modules/silverpushBidAdapter.md +107 -0
  176. package/modules/underdogmediaBidAdapter.js +2 -2
  177. package/modules/videoModule/adQueue.js +2 -2
  178. package/modules/videoModule/index.js +9 -5
  179. package/modules/yahoosspBidAdapter.js +6 -0
  180. package/modules/yahoosspBidAdapter.md +37 -0
  181. package/package.json +1 -1
  182. package/src/adloader.js +2 -1
  183. package/src/native.js +20 -4
  184. package/test/spec/modules/33acrossBidAdapter_spec.js +4 -3
  185. package/test/spec/modules/adhashBidAdapter_spec.js +51 -1
  186. package/test/spec/modules/admanBidAdapter_spec.js +1 -2
  187. package/test/spec/modules/adnuntiusBidAdapter_spec.js +535 -264
  188. package/test/spec/modules/adqueryBidAdapter_spec.js +9 -0
  189. package/test/spec/modules/adrinoBidAdapter_spec.js +4 -0
  190. package/test/spec/modules/adtelligentBidAdapter_spec.js +1 -0
  191. package/test/spec/modules/beopBidAdapter_spec.js +4 -0
  192. package/test/spec/modules/cleanioRtdProvider_spec.js +7 -8
  193. package/test/spec/modules/confiantRtdProvider_spec.js +4 -1
  194. package/test/spec/modules/conversantBidAdapter_spec.js +2 -1
  195. package/test/spec/modules/criteoBidAdapter_spec.js +159 -2
  196. package/test/spec/modules/freewheel-sspBidAdapter_spec.js +5 -2
  197. package/test/spec/modules/gridBidAdapter_spec.js +3 -0
  198. package/test/spec/modules/gumgumBidAdapter_spec.js +14 -0
  199. package/test/spec/modules/liveIntentIdMinimalSystem_spec.js +28 -0
  200. package/test/spec/modules/liveIntentIdSystem_spec.js +45 -0
  201. package/test/spec/modules/magniteAnalyticsAdapter_spec.js +16 -36
  202. package/test/spec/modules/mass_spec.js +2 -0
  203. package/test/spec/modules/minutemediaBidAdapter_spec.js +69 -1
  204. package/test/spec/modules/permutiveRtdProvider_spec.js +0 -20
  205. package/test/spec/modules/prebidServerBidAdapter_spec.js +3 -1
  206. package/test/spec/modules/pubmaticBidAdapter_spec.js +7 -0
  207. package/test/spec/modules/riseBidAdapter_spec.js +69 -1
  208. package/test/spec/modules/rubiconBidAdapter_spec.js +143 -67
  209. package/test/spec/modules/silverpushBidAdapter_spec.js +394 -0
  210. package/test/spec/modules/underdogmediaBidAdapter_spec.js +1 -1
  211. package/test/spec/modules/videoModule/shared/helpers_spec.js +22 -0
  212. package/test/spec/modules/yahoosspBidAdapter_spec.js +60 -1
  213. package/test/spec/native_spec.js +12 -12
@@ -59,7 +59,8 @@ describe('minutemediaAdapter', function () {
59
59
  'mediaTypes': {
60
60
  'video': {
61
61
  'playerSize': [[640, 480]],
62
- 'context': 'instream'
62
+ 'context': 'instream',
63
+ 'plcmt': 1
63
64
  }
64
65
  },
65
66
  'vastXml': '"<VAST version=\\\"2.0\\\">...</VAST>"'
@@ -116,6 +117,11 @@ describe('minutemediaAdapter', function () {
116
117
  expect(request.method).to.equal('POST');
117
118
  });
118
119
 
120
+ it('sends the plcmt to ENDPOINT via POST', function () {
121
+ const request = spec.buildRequests(bidRequests, bidderRequest);
122
+ expect(request.data.bids[0].plcmt).to.equal(1);
123
+ });
124
+
119
125
  it('sends bid request to TEST ENDPOINT via POST', function () {
120
126
  const request = spec.buildRequests(testModeBidRequests, bidderRequest);
121
127
  expect(request.url).to.equal(TEST_ENDPOINT);
@@ -294,6 +300,68 @@ describe('minutemediaAdapter', function () {
294
300
  expect(request.data.bids[0]).to.have.property('floorPrice', 1.5);
295
301
  });
296
302
 
303
+ it('should check sua param in bid request', function() {
304
+ const sua = {
305
+ 'platform': {
306
+ 'brand': 'macOS',
307
+ 'version': ['12', '4', '0']
308
+ },
309
+ 'browsers': [
310
+ {
311
+ 'brand': 'Chromium',
312
+ 'version': [ '106', '0', '5249', '119' ]
313
+ },
314
+ {
315
+ 'brand': 'Google Chrome',
316
+ 'version': [ '106', '0', '5249', '119' ]
317
+ },
318
+ {
319
+ 'brand': 'Not;A=Brand',
320
+ 'version': [ '99', '0', '0', '0' ]
321
+ }
322
+ ],
323
+ 'mobile': 0,
324
+ 'model': '',
325
+ 'bitness': '64',
326
+ 'architecture': 'x86'
327
+ }
328
+ const bid = utils.deepClone(bidRequests[0]);
329
+ bid.ortb2 = {
330
+ 'device': {
331
+ 'sua': {
332
+ 'platform': {
333
+ 'brand': 'macOS',
334
+ 'version': [ '12', '4', '0' ]
335
+ },
336
+ 'browsers': [
337
+ {
338
+ 'brand': 'Chromium',
339
+ 'version': [ '106', '0', '5249', '119' ]
340
+ },
341
+ {
342
+ 'brand': 'Google Chrome',
343
+ 'version': [ '106', '0', '5249', '119' ]
344
+ },
345
+ {
346
+ 'brand': 'Not;A=Brand',
347
+ 'version': [ '99', '0', '0', '0' ]
348
+ }
349
+ ],
350
+ 'mobile': 0,
351
+ 'model': '',
352
+ 'bitness': '64',
353
+ 'architecture': 'x86'
354
+ }
355
+ }
356
+ }
357
+ const requestWithSua = spec.buildRequests([bid], bidderRequest);
358
+ const data = requestWithSua.data;
359
+ expect(data.bids[0].sua).to.exist;
360
+ expect(data.bids[0].sua).to.deep.equal(sua);
361
+ const request = spec.buildRequests(bidRequests, bidderRequest);
362
+ expect(request.data.bids[0].sua).to.not.exist;
363
+ });
364
+
297
365
  describe('COPPA Param', function() {
298
366
  it('should set coppa equal 0 in bid request if coppa is set to false', function() {
299
367
  const request = spec.buildRequests(bidRequests, bidderRequest);
@@ -560,26 +560,6 @@ describe('permutiveRtdProvider', function () {
560
560
  })
561
561
  })
562
562
 
563
- describe('Default segment targeting', function () {
564
- it('sets segment targeting for Ozone', function () {
565
- const data = transformedTargeting()
566
- const adUnits = getAdUnits()
567
- const config = getConfig()
568
-
569
- readAndSetCohorts({ adUnits }, config)
570
-
571
- adUnits.forEach(adUnit => {
572
- adUnit.bids.forEach(bid => {
573
- const { bidder, params } = bid
574
-
575
- if (bidder === 'ozone') {
576
- expect(deepAccess(params, 'customData.0.targeting.p_standard')).to.eql(data.ac.concat(data.ssp.cohorts))
577
- }
578
- })
579
- })
580
- })
581
- })
582
-
583
563
  describe('Existing key-value targeting', function () {
584
564
  it('doesn\'t overwrite existing key-values for Xandr', function () {
585
565
  const adUnits = getAdUnits()
@@ -3029,7 +3029,7 @@ describe('S2S Adapter', function () {
3029
3029
  expect(response).to.have.property('ttl', 60);
3030
3030
  });
3031
3031
 
3032
- it('handles seatnonbid responses and calls SEAT_NON_BID', function () {
3032
+ it('handles seatnonbid responses and emits SEAT_NON_BID', function () {
3033
3033
  const original = CONFIG;
3034
3034
  CONFIG.extPrebid = { returnallbidstatus: true };
3035
3035
  const nonbidResponse = {...RESPONSE_OPENRTB, ext: {seatnonbid: [{}]}};
@@ -3042,6 +3042,8 @@ describe('S2S Adapter', function () {
3042
3042
  const event = events.emit.secondCall.args;
3043
3043
  expect(event[0]).to.equal(CONSTANTS.EVENTS.SEAT_NON_BID);
3044
3044
  expect(event[1].seatnonbid[0]).to.have.property('auctionId', 2);
3045
+ expect(event[1].requestedBidders).to.deep.equal(['appnexus']);
3046
+ expect(event[1].response).to.deep.equal(responding);
3045
3047
  });
3046
3048
 
3047
3049
  it('respects defaultTtl', function () {
@@ -111,6 +111,7 @@ describe('PubMatic adapter', function () {
111
111
  battr: [13, 14],
112
112
  linearity: 1,
113
113
  placement: 2,
114
+ plcmt: 1,
114
115
  minbitrate: 10,
115
116
  maxbitrate: 10
116
117
  }
@@ -162,6 +163,7 @@ describe('PubMatic adapter', function () {
162
163
  battr: [13, 14],
163
164
  linearity: 1,
164
165
  placement: 2,
166
+ plcmt: 1,
165
167
  minbitrate: 100,
166
168
  maxbitrate: 4096
167
169
  }
@@ -382,6 +384,7 @@ describe('PubMatic adapter', function () {
382
384
  battr: [13, 14],
383
385
  linearity: 1,
384
386
  placement: 2,
387
+ plcmt: 1,
385
388
  minbitrate: 100,
386
389
  maxbitrate: 4096
387
390
  }
@@ -508,6 +511,7 @@ describe('PubMatic adapter', function () {
508
511
  battr: [13, 14],
509
512
  linearity: 1,
510
513
  placement: 2,
514
+ plcmt: 1,
511
515
  minbitrate: 100,
512
516
  maxbitrate: 4096
513
517
  }
@@ -577,6 +581,7 @@ describe('PubMatic adapter', function () {
577
581
  battr: [13, 14],
578
582
  linearity: 1,
579
583
  placement: 2,
584
+ plcmt: 1,
580
585
  minbitrate: 100,
581
586
  maxbitrate: 4096
582
587
  }
@@ -2738,6 +2743,7 @@ describe('PubMatic adapter', function () {
2738
2743
 
2739
2744
  expect(data.imp[1]['video']['linearity']).to.equal(multipleMediaRequests[1].params.video['linearity']);
2740
2745
  expect(data.imp[1]['video']['placement']).to.equal(multipleMediaRequests[1].params.video['placement']);
2746
+ expect(data.imp[1]['video']['plcmt']).to.equal(multipleMediaRequests[1].params.video['plcmt']);
2741
2747
  expect(data.imp[1]['video']['minbitrate']).to.equal(multipleMediaRequests[1].params.video['minbitrate']);
2742
2748
  expect(data.imp[1]['video']['maxbitrate']).to.equal(multipleMediaRequests[1].params.video['maxbitrate']);
2743
2749
 
@@ -3033,6 +3039,7 @@ describe('PubMatic adapter', function () {
3033
3039
 
3034
3040
  expect(data.imp[0]['video']['linearity']).to.equal(videoBidRequests[0].params.video['linearity']);
3035
3041
  expect(data.imp[0]['video']['placement']).to.equal(videoBidRequests[0].params.video['placement']);
3042
+ expect(data.imp[0]['video']['plcmt']).to.equal(videoBidRequests[0].params.video['plcmt']);
3036
3043
  expect(data.imp[0]['video']['minbitrate']).to.equal(videoBidRequests[0].params.video['minbitrate']);
3037
3044
  expect(data.imp[0]['video']['maxbitrate']).to.equal(videoBidRequests[0].params.video['maxbitrate']);
3038
3045
 
@@ -62,7 +62,8 @@ describe('riseAdapter', function () {
62
62
  'mediaTypes': {
63
63
  'video': {
64
64
  'playerSize': [[640, 480]],
65
- 'context': 'instream'
65
+ 'context': 'instream',
66
+ 'plcmt': 1
66
67
  }
67
68
  },
68
69
  'vastXml': '"<VAST version=\\\"2.0\\\">...</VAST>"'
@@ -116,6 +117,11 @@ describe('riseAdapter', function () {
116
117
  expect(request.data.bids[0].placementId).to.equal(placementId);
117
118
  });
118
119
 
120
+ it('sends the plcmt to ENDPOINT via POST', function () {
121
+ const request = spec.buildRequests(bidRequests, bidderRequest);
122
+ expect(request.data.bids[0].plcmt).to.equal(1);
123
+ });
124
+
119
125
  it('sends the is_wrapper parameter to ENDPOINT via POST', function() {
120
126
  const request = spec.buildRequests(bidRequests, bidderRequest);
121
127
  expect(request.data.params).to.be.an('object');
@@ -342,6 +348,68 @@ describe('riseAdapter', function () {
342
348
  expect(request.data.bids[0]).to.have.property('floorPrice', 1.5);
343
349
  });
344
350
 
351
+ it('should check sua param in bid request', function() {
352
+ const sua = {
353
+ 'platform': {
354
+ 'brand': 'macOS',
355
+ 'version': ['12', '4', '0']
356
+ },
357
+ 'browsers': [
358
+ {
359
+ 'brand': 'Chromium',
360
+ 'version': [ '106', '0', '5249', '119' ]
361
+ },
362
+ {
363
+ 'brand': 'Google Chrome',
364
+ 'version': [ '106', '0', '5249', '119' ]
365
+ },
366
+ {
367
+ 'brand': 'Not;A=Brand',
368
+ 'version': [ '99', '0', '0', '0' ]
369
+ }
370
+ ],
371
+ 'mobile': 0,
372
+ 'model': '',
373
+ 'bitness': '64',
374
+ 'architecture': 'x86'
375
+ }
376
+ const bid = utils.deepClone(bidRequests[0]);
377
+ bid.ortb2 = {
378
+ 'device': {
379
+ 'sua': {
380
+ 'platform': {
381
+ 'brand': 'macOS',
382
+ 'version': [ '12', '4', '0' ]
383
+ },
384
+ 'browsers': [
385
+ {
386
+ 'brand': 'Chromium',
387
+ 'version': [ '106', '0', '5249', '119' ]
388
+ },
389
+ {
390
+ 'brand': 'Google Chrome',
391
+ 'version': [ '106', '0', '5249', '119' ]
392
+ },
393
+ {
394
+ 'brand': 'Not;A=Brand',
395
+ 'version': [ '99', '0', '0', '0' ]
396
+ }
397
+ ],
398
+ 'mobile': 0,
399
+ 'model': '',
400
+ 'bitness': '64',
401
+ 'architecture': 'x86'
402
+ }
403
+ }
404
+ }
405
+ const requestWithSua = spec.buildRequests([bid], bidderRequest);
406
+ const data = requestWithSua.data;
407
+ expect(data.bids[0].sua).to.exist;
408
+ expect(data.bids[0].sua).to.deep.equal(sua);
409
+ const request = spec.buildRequests(bidRequests, bidderRequest);
410
+ expect(request.data.bids[0].sua).to.not.exist;
411
+ });
412
+
345
413
  describe('COPPA Param', function() {
346
414
  it('should set coppa equal 0 in bid request if coppa is set to false', function() {
347
415
  const request = spec.buildRequests(bidRequests, bidderRequest);