prebid.js 8.7.0 → 8.9.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 (350) hide show
  1. package/dist/1plusXRtdProvider.js +1 -1
  2. package/dist/33acrossBidAdapter.js +1 -1
  3. package/dist/33acrossIdSystem.js +1 -1
  4. package/dist/a1MediaRtdProvider.js +1 -1
  5. package/dist/adWMGAnalyticsAdapter.js +1 -1
  6. package/dist/adagioBidAdapter.js +1 -1
  7. package/dist/adbookpspBidAdapter.js +1 -1
  8. package/dist/adgenerationBidAdapter.js +1 -1
  9. package/dist/adkernelAdnAnalyticsAdapter.js +1 -1
  10. package/dist/adlooxAdServerVideo.js +1 -1
  11. package/dist/adlooxRtdProvider.js +1 -1
  12. package/dist/admaticBidAdapter.js +1 -1
  13. package/dist/admixerIdSystem.js +1 -1
  14. package/dist/adnuntiusRtdProvider.js +1 -1
  15. package/dist/adpartnerBidAdapter.js +1 -1
  16. package/dist/adqueryBidAdapter.js +1 -1
  17. package/dist/adqueryIdSystem.js +1 -1
  18. package/dist/adrelevantisBidAdapter.js +1 -1
  19. package/dist/adriverIdSystem.js +1 -1
  20. package/dist/adtelligentIdSystem.js +1 -1
  21. package/dist/adtrgtmeBidAdapter.js +1 -1
  22. package/dist/adxcgAnalyticsAdapter.js +1 -1
  23. package/dist/adxcgBidAdapter.js +1 -1
  24. package/dist/adxpremiumAnalyticsAdapter.js +1 -1
  25. package/dist/adyoulikeBidAdapter.js +1 -1
  26. package/dist/aidemBidAdapter.js +1 -1
  27. package/dist/ajaBidAdapter.js +1 -1
  28. package/dist/akamaiDapRtdProvider.js +1 -1
  29. package/dist/alkimiBidAdapter.js +1 -1
  30. package/dist/amxBidAdapter.js +1 -1
  31. package/dist/amxIdSystem.js +1 -1
  32. package/dist/analyticsAdapter.js +1 -1
  33. package/dist/appierAnalyticsAdapter.js +1 -1
  34. package/dist/appnexusBidAdapter.js +1 -1
  35. package/dist/asoBidAdapter.js +1 -1
  36. package/dist/atsAnalyticsAdapter.js +1 -1
  37. package/dist/automatadBidAdapter.js +1 -1
  38. package/dist/axonixBidAdapter.js +1 -1
  39. package/dist/bidViewability.js +1 -1
  40. package/dist/bidglassBidAdapter.js +1 -1
  41. package/dist/bidwatchAnalyticsAdapter.js +1 -1
  42. package/dist/big-richmediaBidAdapter.js +1 -1
  43. package/dist/brandmetricsRtdProvider.js +1 -1
  44. package/dist/bridBidAdapter.js +1 -1
  45. package/dist/bridgewellBidAdapter.js +1 -1
  46. package/dist/brightMountainMediaBidAdapter.js +1 -1
  47. package/dist/brightcomSSPBidAdapter.js +1 -1
  48. package/dist/britepoolIdSystem.js +1 -1
  49. package/dist/browsiRtdProvider.js +1 -1
  50. package/dist/byDataAnalyticsAdapter.js +1 -1
  51. package/dist/carodaBidAdapter.js +1 -1
  52. package/dist/categoryTranslation.js +1 -1
  53. package/dist/chtnwBidAdapter.js +1 -1
  54. package/dist/colossussspBidAdapter.js +1 -1
  55. package/dist/concertAnalyticsAdapter.js +1 -1
  56. package/dist/concertBidAdapter.js +1 -1
  57. package/dist/connectIdSystem.js +1 -1
  58. package/dist/connectadBidAdapter.js +1 -1
  59. package/dist/consumableBidAdapter.js +1 -1
  60. package/dist/conversantAnalyticsAdapter.js +1 -1
  61. package/dist/conversantBidAdapter.js +1 -1
  62. package/dist/craftBidAdapter.js +1 -1
  63. package/dist/criteoBidAdapter.js +1 -1
  64. package/dist/criteoIdSystem.js +1 -1
  65. package/dist/currency.js +1 -1
  66. package/dist/cwireBidAdapter.js +1 -1
  67. package/dist/dacIdSystem.js +1 -1
  68. package/dist/dailyhuntBidAdapter.js +1 -1
  69. package/dist/datablocksBidAdapter.js +1 -1
  70. package/dist/dependencies.json +4 -1
  71. package/dist/dgkeywordRtdProvider.js +1 -1
  72. package/dist/dmdIdSystem.js +1 -1
  73. package/dist/dspxBidAdapter.js +1 -1
  74. package/dist/eplanningAnalyticsAdapter.js +1 -1
  75. package/dist/eplanningBidAdapter.js +1 -1
  76. package/dist/euidIdSystem.js +1 -1
  77. package/dist/fabrickIdSystem.js +1 -1
  78. package/dist/feedadBidAdapter.js +1 -1
  79. package/dist/finativeBidAdapter.js +1 -1
  80. package/dist/fintezaAnalyticsAdapter.js +1 -1
  81. package/dist/fledgeForGpt.js +1 -1
  82. package/dist/freewheel-sspBidAdapter.js +1 -1
  83. package/dist/genericAnalyticsAdapter.js +1 -1
  84. package/dist/geoedgeRtdProvider.js +1 -1
  85. package/dist/gmosspBidAdapter.js +1 -1
  86. package/dist/gnetBidAdapter.js +1 -1
  87. package/dist/goldbachBidAdapter.js +1 -1
  88. package/dist/greenbidsAnalyticsAdapter.js +1 -1
  89. package/dist/greenbidsRtdProvider.js +1 -1
  90. package/dist/gridBidAdapter.js +1 -1
  91. package/dist/growthCodeAnalyticsAdapter.js +1 -1
  92. package/dist/growthCodeIdSystem.js +1 -1
  93. package/dist/growthCodeRtdProvider.js +1 -1
  94. package/dist/gumgumBidAdapter.js +1 -1
  95. package/dist/h12mediaBidAdapter.js +1 -1
  96. package/dist/hadronAnalyticsAdapter.js +1 -1
  97. package/dist/hadronIdSystem.js +1 -1
  98. package/dist/hadronRtdProvider.js +1 -1
  99. package/dist/hypelabBidAdapter.js +1 -1
  100. package/dist/iasRtdProvider.js +1 -1
  101. package/dist/id5AnalyticsAdapter.js +1 -1
  102. package/dist/id5IdSystem.js +1 -1
  103. package/dist/idImportLibrary.js +1 -1
  104. package/dist/identityLinkIdSystem.js +1 -1
  105. package/dist/imRtdProvider.js +1 -1
  106. package/dist/imdsBidAdapter.js +1 -1
  107. package/dist/impactifyBidAdapter.js +1 -1
  108. package/dist/improvedigitalBidAdapter.js +1 -1
  109. package/dist/imuIdSystem.js +1 -1
  110. package/dist/insticatorBidAdapter.js +1 -1
  111. package/dist/intentIqIdSystem.js +1 -1
  112. package/dist/invisiblyAnalyticsAdapter.js +1 -1
  113. package/dist/ixBidAdapter.js +1 -1
  114. package/dist/jixieBidAdapter.js +1 -1
  115. package/dist/justpremiumBidAdapter.js +1 -1
  116. package/dist/jwplayerRtdProvider.js +1 -1
  117. package/dist/kargoAnalyticsAdapter.js +1 -1
  118. package/dist/kargoBidAdapter.js +1 -1
  119. package/dist/kinessoIdSystem.js +1 -1
  120. package/dist/konduitAnalyticsAdapter.js +1 -1
  121. package/dist/konduitWrapper.js +1 -1
  122. package/dist/kueezBidAdapter.js +1 -1
  123. package/dist/kueezRtbBidAdapter.js +1 -1
  124. package/dist/kulturemediaBidAdapter.js +1 -1
  125. package/dist/lassoBidAdapter.js +1 -1
  126. package/dist/lifestreetBidAdapter.js +1 -1
  127. package/dist/limelightDigitalBidAdapter.js +1 -1
  128. package/dist/liveIntentAnalyticsAdapter.js +1 -1
  129. package/dist/liveIntentIdSystem.js +1 -1
  130. package/dist/livewrappedAnalyticsAdapter.js +1 -1
  131. package/dist/logicadBidAdapter.js +1 -1
  132. package/dist/loglyliftBidAdapter.js +1 -1
  133. package/dist/lotamePanoramaIdSystem.js +1 -1
  134. package/dist/luponmediaBidAdapter.js +1 -1
  135. package/dist/magniteAnalyticsAdapter.js +1 -1
  136. package/dist/malltvAnalyticsAdapter.js +1 -1
  137. package/dist/mantisBidAdapter.js +1 -1
  138. package/dist/marsmediaAnalyticsAdapter.js +1 -1
  139. package/dist/marsmediaBidAdapter.js +1 -1
  140. package/dist/mediafuseBidAdapter.js +1 -1
  141. package/dist/medianetAnalyticsAdapter.js +1 -1
  142. package/dist/mediasquareBidAdapter.js +1 -1
  143. package/dist/merkleIdSystem.js +1 -1
  144. package/dist/mgidBidAdapter.js +1 -1
  145. package/dist/mgidRtdProvider.js +1 -1
  146. package/dist/minutemediaBidAdapter.js +1 -1
  147. package/dist/minutemediaplusBidAdapter.js +1 -1
  148. package/dist/mspa.js +1 -1
  149. package/dist/mwOpenLinkIdSystem.js +1 -1
  150. package/dist/nativoBidAdapter.js +1 -1
  151. package/dist/naveggIdSystem.js +1 -1
  152. package/dist/neuwoRtdProvider.js +1 -1
  153. package/dist/nexx360BidAdapter.js +1 -1
  154. package/dist/not-for-prod/prebid.js +248 -247
  155. package/dist/novatiqIdSystem.js +1 -1
  156. package/dist/oguryBidAdapter.js +1 -1
  157. package/dist/onetagBidAdapter.js +1 -1
  158. package/dist/ooloAnalyticsAdapter.js +1 -1
  159. package/dist/open8BidAdapter.js +1 -1
  160. package/dist/operaadsBidAdapter.js +1 -1
  161. package/dist/operaadsIdSystem.js +1 -0
  162. package/dist/optidigitalBidAdapter.js +1 -1
  163. package/dist/optimeraRtdProvider.js +1 -1
  164. package/dist/outbrainBidAdapter.js +1 -1
  165. package/dist/oxxionAnalyticsAdapter.js +1 -1
  166. package/dist/oxxionRtdProvider.js +1 -1
  167. package/dist/parrableIdSystem.js +1 -1
  168. package/dist/pixfutureBidAdapter.js +1 -1
  169. package/dist/prebid-core.js +2 -2
  170. package/dist/prebidServerBidAdapter.js +1 -1
  171. package/dist/prebidmanagerAnalyticsAdapter.js +1 -1
  172. package/dist/priceFloors.js +1 -1
  173. package/dist/prismaBidAdapter.js +1 -1
  174. package/dist/pubgeniusBidAdapter.js +1 -1
  175. package/dist/publinkIdSystem.js +1 -1
  176. package/dist/pubmaticAnalyticsAdapter.js +1 -1
  177. package/dist/pubmaticBidAdapter.js +1 -1
  178. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  179. package/dist/pubxaiAnalyticsAdapter.js +1 -1
  180. package/dist/pxyzBidAdapter.js +1 -1
  181. package/dist/quantcastBidAdapter.js +1 -1
  182. package/dist/qwarryBidAdapter.js +1 -1
  183. package/dist/readpeakBidAdapter.js +1 -1
  184. package/dist/reconciliationRtdProvider.js +1 -1
  185. package/dist/relaidoBidAdapter.js +1 -1
  186. package/dist/relevadRtdProvider.js +1 -1
  187. package/dist/retailspotBidAdapter.js +1 -1
  188. package/dist/rhythmoneBidAdapter.js +1 -1
  189. package/dist/riseBidAdapter.js +1 -1
  190. package/dist/rivrAnalyticsAdapter.js +1 -1
  191. package/dist/roxotAnalyticsAdapter.js +1 -1
  192. package/dist/rubiconBidAdapter.js +1 -1
  193. package/dist/scaleableAnalyticsAdapter.js +1 -1
  194. package/dist/seedingAllianceBidAdapter.js +1 -1
  195. package/dist/seedtagBidAdapter.js +1 -1
  196. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  197. package/dist/sharethroughBidAdapter.js +1 -1
  198. package/dist/shinezBidAdapter.js +1 -1
  199. package/dist/silverpushBidAdapter.js +1 -1
  200. package/dist/sirdataRtdProvider.js +1 -1
  201. package/dist/slimcutBidAdapter.js +1 -1
  202. package/dist/smaatoBidAdapter.js +1 -1
  203. package/dist/smartadserverBidAdapter.js +1 -1
  204. package/dist/smartxBidAdapter.js +1 -1
  205. package/dist/smartyadsBidAdapter.js +1 -1
  206. package/dist/smilewantedBidAdapter.js +1 -1
  207. package/dist/snigelBidAdapter.js +1 -1
  208. package/dist/sonobiAnalyticsAdapter.js +1 -1
  209. package/dist/sonobiBidAdapter.js +1 -1
  210. package/dist/sovrnAnalyticsAdapter.js +1 -1
  211. package/dist/sovrnBidAdapter.js +1 -1
  212. package/dist/sspBCBidAdapter.js +1 -1
  213. package/dist/staqAnalyticsAdapter.js +1 -1
  214. package/dist/stvBidAdapter.js +1 -1
  215. package/dist/sublimeBidAdapter.js +1 -1
  216. package/dist/taboolaBidAdapter.js +1 -1
  217. package/dist/talkadsBidAdapter.js +1 -1
  218. package/dist/tapadIdSystem.js +1 -1
  219. package/dist/targetVideoBidAdapter.js +1 -1
  220. package/dist/teadsBidAdapter.js +1 -1
  221. package/dist/teadsIdSystem.js +1 -1
  222. package/dist/terceptAnalyticsAdapter.js +1 -1
  223. package/dist/timeoutRtdProvider.js +1 -1
  224. package/dist/topicsFpdModule.js +1 -1
  225. package/dist/trionBidAdapter.js +1 -1
  226. package/dist/tripleliftBidAdapter.js +1 -1
  227. package/dist/ttdBidAdapter.js +1 -1
  228. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  229. package/dist/uid2IdSystem.js +1 -1
  230. package/dist/underdogmediaBidAdapter.js +1 -1
  231. package/dist/undertoneBidAdapter.js +1 -1
  232. package/dist/unifiedIdSystem.js +1 -1
  233. package/dist/verizonMediaIdSystem.js +1 -1
  234. package/dist/vidazooBidAdapter.js +1 -1
  235. package/dist/videobyteBidAdapter.js +1 -1
  236. package/dist/visxBidAdapter.js +1 -1
  237. package/dist/vrtcalBidAdapter.js +1 -1
  238. package/dist/vuukleBidAdapter.js +1 -1
  239. package/dist/weboramaRtdProvider.js +1 -1
  240. package/dist/widespaceBidAdapter.js +1 -1
  241. package/dist/winrBidAdapter.js +1 -1
  242. package/dist/yahoosspBidAdapter.js +1 -1
  243. package/dist/yieldmoBidAdapter.js +1 -1
  244. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  245. package/dist/yuktamediaAnalyticsAdapter.js +1 -1
  246. package/dist/zeta_global_sspAnalyticsAdapter.js +1 -1
  247. package/dist/zeta_global_sspBidAdapter.js +1 -1
  248. package/integrationExamples/gpt/growthcode.html +3 -12
  249. package/integrationExamples/topics/topics-server.js +72 -0
  250. package/libraries/mspa/activityControls.js +3 -1
  251. package/modules/.submodules.json +2 -1
  252. package/modules/a1MediaRtdProvider.js +1 -1
  253. package/modules/adagioBidAdapter.js +11 -3
  254. package/modules/admaticBidAdapter.js +5 -0
  255. package/modules/adqueryBidAdapter.js +23 -21
  256. package/modules/adqueryIdSystem.js +45 -30
  257. package/modules/adrelevantisBidAdapter.js +2 -0
  258. package/modules/bidViewability.js +7 -0
  259. package/modules/bidViewability.md +9 -8
  260. package/modules/brandmetricsRtdProvider.js +30 -27
  261. package/modules/concertBidAdapter.js +1 -0
  262. package/modules/criteoBidAdapter.js +66 -43
  263. package/modules/fledgeForGpt.js +17 -4
  264. package/modules/fledgeForGpt.md +17 -10
  265. package/modules/geoedgeRtdProvider.js +44 -18
  266. package/modules/geoedgeRtdProvider.md +2 -1
  267. package/modules/growthCodeAnalyticsAdapter.js +7 -4
  268. package/modules/growthCodeAnalyticsAdapter.md +1 -7
  269. package/modules/liveIntentIdSystem.js +16 -1
  270. package/modules/nativoBidAdapter.js +21 -3
  271. package/modules/nexx360BidAdapter.js +7 -1
  272. package/modules/onetagBidAdapter.js +3 -0
  273. package/modules/operaadsBidAdapter.js +5 -0
  274. package/modules/operaadsBidAdapter.md +5 -5
  275. package/modules/operaadsIdSystem.js +106 -0
  276. package/modules/operaadsIdSystem.md +52 -0
  277. package/modules/oxxionAnalyticsAdapter.js +22 -5
  278. package/modules/prebidServerBidAdapter/index.js +8 -2
  279. package/modules/pubmaticAnalyticsAdapter.js +16 -3
  280. package/modules/rubiconBidAdapter.js +2 -2
  281. package/modules/smartyadsBidAdapter.js +18 -1
  282. package/modules/snigelBidAdapter.js +69 -16
  283. package/modules/snigelBidAdapter.md +9 -3
  284. package/modules/topicsFpdModule.js +35 -9
  285. package/modules/visxBidAdapter.js +51 -1
  286. package/package.json +2 -2
  287. package/src/adapters/bidderFactory.js +14 -5
  288. package/src/adloader.js +1 -0
  289. package/src/ajax.js +126 -87
  290. package/src/constants.json +8 -2
  291. package/src/native.js +14 -3
  292. package/test/mocks/xhr.js +256 -9
  293. package/test/spec/libraries/mspa/activityControls_spec.js +6 -0
  294. package/test/spec/modules/adagioBidAdapter_spec.js +15 -0
  295. package/test/spec/modules/adlooxAdServerVideo_spec.js +1 -5
  296. package/test/spec/modules/adlooxRtdProvider_spec.js +1 -5
  297. package/test/spec/modules/admaticBidAdapter_spec.js +5 -0
  298. package/test/spec/modules/adqueryIdSystem_spec.js +13 -24
  299. package/test/spec/modules/bidViewability_spec.js +32 -1
  300. package/test/spec/modules/brandmetricsRtdProvider_spec.js +6 -0
  301. package/test/spec/modules/categoryTranslation_spec.js +7 -9
  302. package/test/spec/modules/concertBidAdapter_spec.js +1 -1
  303. package/test/spec/modules/conversantAnalyticsAdapter_spec.js +3 -5
  304. package/test/spec/modules/criteoBidAdapter_spec.js +228 -0
  305. package/test/spec/modules/currency_spec.js +2 -2
  306. package/test/spec/modules/dmdIdSystem_spec.js +2 -2
  307. package/test/spec/modules/eids_spec.js +48 -0
  308. package/test/spec/modules/euidIdSystem_spec.js +10 -9
  309. package/test/spec/modules/feedadBidAdapter_spec.js +1 -1
  310. package/test/spec/modules/fledge_spec.js +117 -43
  311. package/test/spec/modules/geoedgeRtdProvider_spec.js +52 -39
  312. package/test/spec/modules/greenbidsRtdProvider_spec.js +3 -12
  313. package/test/spec/modules/growthCodeAnalyticsAdapter_spec.js +0 -1
  314. package/test/spec/modules/hadronIdSystem_spec.js +1 -1
  315. package/test/spec/modules/id5AnalyticsAdapter_spec.js +1 -7
  316. package/test/spec/modules/id5IdSystem_spec.js +25 -25
  317. package/test/spec/modules/identityLinkIdSystem_spec.js +0 -2
  318. package/test/spec/modules/intentIqIdSystem_spec.js +0 -2
  319. package/test/spec/modules/invisiblyAnalyticsAdapter_spec.js +2 -6
  320. package/test/spec/modules/jwplayerRtdProvider_spec.js +26 -28
  321. package/test/spec/modules/liveIntentIdMinimalSystem_spec.js +5 -0
  322. package/test/spec/modules/liveIntentIdSystem_spec.js +5 -0
  323. package/test/spec/modules/magniteAnalyticsAdapter_spec.js +2 -2
  324. package/test/spec/modules/mgidRtdProvider_spec.js +1 -5
  325. package/test/spec/modules/nativoBidAdapter_spec.js +6 -1
  326. package/test/spec/modules/nexx360BidAdapter_spec.js +48 -1
  327. package/test/spec/modules/oguryBidAdapter_spec.js +5 -19
  328. package/test/spec/modules/onetagBidAdapter_spec.js +69 -0
  329. package/test/spec/modules/ooloAnalyticsAdapter_spec.js +1 -1
  330. package/test/spec/modules/operaadsIdSystem_spec.js +53 -0
  331. package/test/spec/modules/oxxionAnalyticsAdapter_spec.js +6 -1
  332. package/test/spec/modules/prebidServerBidAdapter_spec.js +33 -2
  333. package/test/spec/modules/priceFloors_spec.js +33 -37
  334. package/test/spec/modules/publinkIdSystem_spec.js +1 -1
  335. package/test/spec/modules/pubmaticAnalyticsAdapter_spec.js +102 -18
  336. package/test/spec/modules/pubwiseAnalyticsAdapter_spec.js +2 -8
  337. package/test/spec/modules/rubiconBidAdapter_spec.js +24 -0
  338. package/test/spec/modules/smartyadsBidAdapter_spec.js +49 -0
  339. package/test/spec/modules/snigelBidAdapter_spec.js +57 -6
  340. package/test/spec/modules/teadsIdSystem_spec.js +1 -1
  341. package/test/spec/modules/topicsFpdModule_spec.js +102 -1
  342. package/test/spec/modules/uid2IdSystem_helpers.js +5 -5
  343. package/test/spec/modules/uid2IdSystem_spec.js +24 -24
  344. package/test/spec/modules/userId_spec.js +1 -1
  345. package/test/spec/modules/visxBidAdapter_spec.js +151 -1
  346. package/test/spec/modules/zeta_global_sspAnalyticsAdapter_spec.js +2 -5
  347. package/test/spec/native_spec.js +20 -5
  348. package/test/spec/unit/core/ajax_spec.js +403 -0
  349. package/test/spec/unit/core/bidderFactory_spec.js +80 -8
  350. package/test/spec/videoCache_spec.js +4 -4
@@ -163,11 +163,17 @@
163
163
  "MAIN": 3
164
164
  },
165
165
  "NATIVE_KEYS_THAT_ARE_NOT_ASSETS": [
166
- "privacyLink",
167
166
  "clickUrl",
168
167
  "sendTargetingKeys",
169
168
  "adTemplate",
170
169
  "rendererUrl",
171
170
  "type"
172
- ]
171
+ ],
172
+ "FLOOR_VALUES": {
173
+ "NO_DATA": "noData",
174
+ "AD_UNIT": "adUnit",
175
+ "SET_CONFIG": "setConfig",
176
+ "FETCH": "fetch",
177
+ "SUCCESS": "success"
178
+ }
173
179
  }
package/src/native.js CHANGED
@@ -480,6 +480,11 @@ export function toOrtbNativeRequest(legacyNativeAssets) {
480
480
  continue;
481
481
  }
482
482
 
483
+ if (key === 'privacyLink') {
484
+ ortb.privacy = 1;
485
+ continue;
486
+ }
487
+
483
488
  const asset = legacyNativeAssets[key];
484
489
  let required = 0;
485
490
  if (asset.required && isBoolean(asset.required)) {
@@ -623,6 +628,9 @@ export function fromOrtbNativeRequest(openRTBRequest) {
623
628
  oldNativeObject[prebidAssetName].len = asset.data.len;
624
629
  }
625
630
  }
631
+ if (openRTBRequest.privacy) {
632
+ oldNativeObject.privacyLink = { required: false };
633
+ }
626
634
  // video was not supported by old prebid assets
627
635
  }
628
636
  return oldNativeObject;
@@ -696,8 +704,11 @@ export function legacyPropertiesToOrtbNative(legacyNative) {
696
704
  // in general, native trackers seem to be neglected and/or broken
697
705
  response.jstracker = Array.isArray(value) ? value.join('') : value;
698
706
  break;
707
+ case 'privacyLink':
708
+ response.privacy = value;
709
+ break;
699
710
  }
700
- })
711
+ });
701
712
  return response;
702
713
  }
703
714
 
@@ -780,8 +791,8 @@ export function toLegacyResponse(ortbResponse, ortbRequest) {
780
791
  legacyResponse.impressionTrackers = [];
781
792
  let jsTrackers = [];
782
793
 
783
- if (ortbRequest?.imptrackers) {
784
- legacyResponse.impressionTrackers.push(...ortbRequest.imptrackers);
794
+ if (ortbResponse.imptrackers) {
795
+ legacyResponse.impressionTrackers.push(...ortbResponse.imptrackers);
785
796
  }
786
797
  for (const eventTracker of ortbResponse?.eventtrackers || []) {
787
798
  if (eventTracker.event === TRACKER_EVENTS.impression && eventTracker.method === TRACKER_METHODS.img) {
package/test/mocks/xhr.js CHANGED
@@ -1,12 +1,236 @@
1
1
  import {getUniqueIdentifierStr} from '../../src/utils.js';
2
+ import {GreedyPromise} from '../../src/utils/promise.js';
3
+ import {fakeXhr} from 'nise';
4
+ import {dep} from 'src/ajax.js';
2
5
 
3
- export let server = sinon.createFakeServer();
4
- export let xhr = global.XMLHttpRequest;
6
+ export const xhr = sinon.useFakeXMLHttpRequest();
7
+ export const server = mockFetchServer();
5
8
 
6
- beforeEach(function() {
7
- server.restore();
8
- server = sinon.createFakeServer();
9
- xhr = global.XMLHttpRequest;
9
+ /**
10
+ * An (incomplete) replica of nise's fakeServer, but backing fetch used in ajax.js (rather than XHR).
11
+ */
12
+ function mockFetchServer() {
13
+ const sandbox = sinon.createSandbox();
14
+ const bodies = new WeakMap();
15
+ const requests = [];
16
+ const {DONE, UNSENT} = XMLHttpRequest;
17
+
18
+ function makeRequest(resource, options) {
19
+ const requestBody = options?.body || bodies.get(resource);
20
+ const request = new Request(resource, options);
21
+ bodies.set(request, requestBody);
22
+ return request;
23
+ }
24
+
25
+ function mockXHR(resource, options) {
26
+ let resolve, reject;
27
+ const promise = new GreedyPromise((res, rej) => {
28
+ resolve = res;
29
+ reject = rej;
30
+ });
31
+
32
+ function error(reason = new TypeError('Failed to fetch')) {
33
+ mockReq.status = 0;
34
+ reject(reason);
35
+ }
36
+
37
+ const request = makeRequest(resource, options);
38
+ request.signal.onabort = () => error(new DOMException('The user aborted a request'));
39
+ let responseHeaders;
40
+
41
+ const mockReq = {
42
+ fetch: {
43
+ request,
44
+ requestBody: bodies.get(request),
45
+ promise,
46
+ },
47
+ readyState: UNSENT,
48
+ url: request.url,
49
+ method: request.method,
50
+ requestBody: bodies.get(request),
51
+ status: 0,
52
+ statusText: '',
53
+ requestHeaders: new Proxy(request.headers, {
54
+ get(target, prop) {
55
+ return typeof prop === 'string' && target.has(prop) ? target.get(prop) : {}[prop];
56
+ },
57
+ has(target, prop) {
58
+ return typeof prop === 'string' && target.has(prop);
59
+ },
60
+ ownKeys(target) {
61
+ return Array.from(target.keys());
62
+ },
63
+ getOwnPropertyDescriptor(target, prop) {
64
+ if (typeof prop === 'string' && target.has(prop)) {
65
+ return {
66
+ enumerable: true,
67
+ configurable: true,
68
+ writable: false,
69
+ value: target.get(prop)
70
+ }
71
+ }
72
+ }
73
+ }),
74
+ withCredentials: request.credentials === 'include',
75
+ setStatus(status) {
76
+ // nise replaces invalid status with 200
77
+ status = typeof status === 'number' ? status : 200;
78
+ mockReq.status = status;
79
+ mockReq.statusText = fakeXhr.FakeXMLHttpRequest.statusCodes[status] || '';
80
+ },
81
+ setResponseHeaders(headers) {
82
+ responseHeaders = headers;
83
+ },
84
+ setResponseBody(body) {
85
+ if (mockReq.status === 0) {
86
+ error();
87
+ return;
88
+ }
89
+ const resp = Object.defineProperties(new Response(body, {
90
+ status: mockReq.status,
91
+ statusText: mockReq.statusText,
92
+ headers: responseHeaders || {},
93
+ }), {
94
+ url: {
95
+ get: () => mockReq.fetch.request.url,
96
+ }
97
+ });
98
+ mockReq.readyState = DONE;
99
+ // tests expect respond() to run everything immediately,
100
+ // so make body available syncronously
101
+ resp.text = () => GreedyPromise.resolve(body || '');
102
+ Object.assign(mockReq.fetch, {
103
+ response: resp,
104
+ responseBody: body || ''
105
+ })
106
+ resolve(resp);
107
+ },
108
+ respond(status = 200, headers, body) {
109
+ mockReq.setStatus(status);
110
+ mockReq.setResponseHeaders(headers);
111
+ mockReq.setResponseBody(body);
112
+ },
113
+ error
114
+ };
115
+ return mockReq;
116
+ }
117
+
118
+ let enabled = false;
119
+ let timeoutsEnabled = false;
120
+
121
+ function enable() {
122
+ if (!enabled) {
123
+ sandbox.stub(dep, 'fetch').callsFake((resource, options) => {
124
+ const req = mockXHR(resource, options);
125
+ requests.push(req);
126
+ return req.fetch.promise;
127
+ });
128
+ sandbox.stub(dep, 'makeRequest').callsFake(makeRequest);
129
+ const timeout = dep.timeout;
130
+ sandbox.stub(dep, 'timeout').callsFake(function () {
131
+ if (timeoutsEnabled) {
132
+ return timeout.apply(null, arguments);
133
+ } else {
134
+ return {};
135
+ }
136
+ });
137
+ enabled = true;
138
+ }
139
+ }
140
+
141
+ enable();
142
+
143
+ const responders = [];
144
+
145
+ function respondWith() {
146
+ let response, urlMatcher, methodMatcher;
147
+ urlMatcher = methodMatcher = () => true;
148
+ switch (arguments.length) {
149
+ case 1:
150
+ ([response] = arguments);
151
+ break;
152
+ case 2:
153
+ ([urlMatcher, response] = arguments);
154
+ break;
155
+ case 3:
156
+ ([methodMatcher, urlMatcher, response] = arguments);
157
+ methodMatcher = ((toMatch) => (method) => method === toMatch)(methodMatcher);
158
+ break;
159
+ default:
160
+ throw new Error('Invalid respondWith invocation');
161
+ }
162
+ if (typeof urlMatcher.exec === 'function') {
163
+ urlMatcher = ((rx) => (url) => rx.exec(url)?.slice(1))(urlMatcher);
164
+ } else if (typeof urlMatcher === 'string') {
165
+ urlMatcher = ((toMatch) => (url) => url === toMatch)(urlMatcher);
166
+ }
167
+ responders.push((req) => {
168
+ if (req.readyState !== DONE && methodMatcher(req.method)) {
169
+ const arg = urlMatcher(req.url);
170
+ if (arg) {
171
+ if (typeof response === 'function') {
172
+ response(req, ...(Array.isArray(arg) ? arg : []));
173
+ } else if (typeof response === 'string') {
174
+ req.respond(200, null, response);
175
+ } else {
176
+ req.respond.apply(req, response);
177
+ }
178
+ }
179
+ }
180
+ });
181
+ }
182
+
183
+ function resetState() {
184
+ requests.length = 0;
185
+ responders.length = 0;
186
+ timeoutsEnabled = false;
187
+ }
188
+
189
+ return {
190
+ requests,
191
+ enable,
192
+ restore() {
193
+ resetState();
194
+ sandbox.restore();
195
+ enabled = false;
196
+ },
197
+ reset() {
198
+ sandbox.resetHistory();
199
+ resetState();
200
+ },
201
+ respondWith,
202
+ respond() {
203
+ if (arguments.length > 0) {
204
+ respondWith.apply(null, arguments);
205
+ }
206
+ requests.forEach(req => {
207
+ for (let i = responders.length - 1; i >= 0; i--) {
208
+ responders[i](req);
209
+ if (req.readyState === DONE) break;
210
+ }
211
+ if (req.readyState !== DONE) {
212
+ req.respond(404, {}, '');
213
+ }
214
+ });
215
+ },
216
+ /**
217
+ * the timeout mechanism is quite different between XHR and fetch
218
+ * by default, mocked fetch does not time out - to reflect fakeServer XHRs
219
+ * note that many tests will fire requests without caring or waiting for their response -
220
+ * if they are timed out later, during unrelated tests, the log messages might interfere with their
221
+ * assertions
222
+ */
223
+ get autoTimeout() {
224
+ return timeoutsEnabled;
225
+ },
226
+ set autoTimeout(val) {
227
+ timeoutsEnabled = !!val;
228
+ }
229
+ };
230
+ }
231
+
232
+ beforeEach(function () {
233
+ server.reset();
10
234
  });
11
235
 
12
236
  const bid = getUniqueIdentifierStr().substring(4);
@@ -20,12 +244,35 @@ afterEach(function () {
20
244
  return (s) => s.split('\n').map(s => `${preamble} ${s}`).join('\n');
21
245
  })();
22
246
 
247
+ function format(obj, body = null) {
248
+ if (obj == null) return obj;
249
+ const fmt = {};
250
+ let node = obj;
251
+ while (node != null) {
252
+ Object.keys(node).forEach((k) => {
253
+ const val = obj[k];
254
+ if (typeof val !== 'function' && !fmt.hasOwnProperty(k)) {
255
+ fmt[k] = val;
256
+ }
257
+ });
258
+ node = Object.getPrototypeOf(node);
259
+ }
260
+ if (obj.headers != null) {
261
+ fmt.headers = Object.fromEntries(obj.headers.entries())
262
+ }
263
+ fmt.body = body;
264
+ return fmt;
265
+ }
266
+
23
267
 
24
- console.log(prepend(`XHR mock state after failure (for test '${this.currentTest.fullTitle()}'): ${server.requests.length} requests`))
268
+ console.log(prepend(`XHR mock state after failure (for test '${this.currentTest.fullTitle()}'): ${server.requests.length} requests`));
25
269
  server.requests.forEach((req, i) => {
26
270
  console.log(prepend(`Request #${i}:`));
27
- console.log(prepend(JSON.stringify(req, null, 2)));
28
- })
271
+ console.log(prepend(JSON.stringify({
272
+ request: format(req.fetch.request, req.fetch.requestBody),
273
+ response: format(req.fetch.response, req.fetch.responseBody)
274
+ }, null, 2)));
275
+ });
29
276
  }
30
277
  });
31
278
  /* eslint-enable */
@@ -35,6 +35,12 @@ describe('Consent interpretation', () => {
35
35
  }));
36
36
  expect(result).to.equal(true);
37
37
  });
38
+ it('should be true (basic consent conditions do not pass) with covered set to zero (invalid state)', () => {
39
+ const result = isBasicConsentDenied(mkConsent({
40
+ MspaCoveredTransaction: 0
41
+ }));
42
+ expect(result).to.equal(true);
43
+ });
38
44
  it('should not deny when consent for under-13 is null', () => {
39
45
  expect(isBasicConsentDenied(mkConsent({
40
46
  KnownChildSensitiveDataConsents: [0, null]
@@ -322,6 +322,21 @@ describe('Adagio bid adapter', () => {
322
322
  expect(requests[0].data.adUnits[0].transactionId).to.not.exist;
323
323
  });
324
324
 
325
+ it('should enrich prebid bid requests params', function() {
326
+ const expectedAuctionId = '373bcda7-9794-4f1c-be2c-0d223d11d579'
327
+ const expectedPageviewId = '56befc26-8cf0-472d-b105-73896df8eb89';
328
+ sandbox.stub(utils, 'generateUUID').returns(expectedAuctionId);
329
+ sandbox.stub(adagio, 'getPageviewId').returns(expectedPageviewId);
330
+
331
+ const bid01 = new BidRequestBuilder().withParams().build();
332
+ const bidderRequest = new BidderRequestBuilder().build();
333
+
334
+ spec.buildRequests([bid01], bidderRequest);
335
+
336
+ expect(bid01.params.adagioAuctionId).eq(expectedAuctionId);
337
+ expect(bid01.params.pageviewId).eq(expectedPageviewId);
338
+ });
339
+
325
340
  it('should enqueue computed features for collect usage', function() {
326
341
  sandbox.stub(Date, 'now').returns(12345);
327
342
 
@@ -1,11 +1,11 @@
1
1
  import adapterManager from 'src/adapterManager.js';
2
2
  import analyticsAdapter from 'modules/adlooxAnalyticsAdapter.js';
3
- import { ajax } from 'src/ajax.js';
4
3
  import { buildVideoUrl } from 'modules/adlooxAdServerVideo.js';
5
4
  import { expect } from 'chai';
6
5
  import * as events from 'src/events.js';
7
6
  import { targeting } from 'src/targeting.js';
8
7
  import * as utils from 'src/utils.js';
8
+ import {server} from '../../mocks/xhr.js';
9
9
 
10
10
  const analyticsAdapterName = 'adloox';
11
11
 
@@ -199,11 +199,9 @@ describe('Adloox Ad Server Video', function () {
199
199
  });
200
200
 
201
201
  describe('process VAST', function () {
202
- let server = null;
203
202
  let BID = null;
204
203
  let getWinningBidsStub;
205
204
  beforeEach(function () {
206
- server = sinon.createFakeServer();
207
205
  BID = utils.deepClone(bid);
208
206
  getWinningBidsStub = sinon.stub(targeting, 'getWinningBids')
209
207
  getWinningBidsStub.withArgs(adUnit.code).returns([ BID ]);
@@ -212,8 +210,6 @@ describe('Adloox Ad Server Video', function () {
212
210
  getWinningBidsStub.restore();
213
211
  getWinningBidsStub = undefined;
214
212
  BID = null;
215
- server.restore();
216
- server = null;
217
213
  });
218
214
 
219
215
  it('should return URL unchanged for non-VAST', function (done) {
@@ -1,12 +1,12 @@
1
1
  import adapterManager from 'src/adapterManager.js';
2
2
  import analyticsAdapter from 'modules/adlooxAnalyticsAdapter.js';
3
3
  import {auctionManager} from 'src/auctionManager.js';
4
- import { config as _config } from 'src/config.js';
5
4
  import { expect } from 'chai';
6
5
  import * as events from 'src/events.js';
7
6
  import * as prebidGlobal from 'src/prebidGlobal.js';
8
7
  import { subModuleObj as rtdProvider } from 'modules/adlooxRtdProvider.js';
9
8
  import * as utils from 'src/utils.js';
9
+ import {server} from '../../mocks/xhr.js';
10
10
 
11
11
  const analyticsAdapterName = 'adloox';
12
12
 
@@ -139,16 +139,12 @@ describe('Adloox RTD Provider', function () {
139
139
  expect(analyticsAdapter.context).is.null;
140
140
  });
141
141
 
142
- let server = null;
143
142
  let CONFIG = null;
144
143
  beforeEach(function () {
145
- server = sinon.createFakeServer();
146
144
  CONFIG = utils.deepClone(config);
147
145
  });
148
146
  afterEach(function () {
149
147
  CONFIG = null;
150
- server.restore();
151
- server = null;
152
148
  });
153
149
 
154
150
  it('should fetch segments', function (done) {
@@ -28,6 +28,7 @@ describe('admaticBidAdapter', () => {
28
28
  'bidderRequestId': '22edbae2733bf6',
29
29
  'auctionId': '1d1a030790a475',
30
30
  'creativeId': 'er2ee',
31
+ 'ortb2Imp': { 'ext': { 'instl': 1 } },
31
32
  'ortb2': { 'badv': ['admatic.com.tr'] }
32
33
  };
33
34
 
@@ -52,6 +53,7 @@ describe('admaticBidAdapter', () => {
52
53
  'networkId': 10433394,
53
54
  'host': 'layer.serve.admatic.com.tr'
54
55
  },
56
+ 'ortb2Imp': { 'ext': { 'instl': 1 } },
55
57
  'ortb2': { 'badv': ['admatic.com.tr'] },
56
58
  'mediaTypes': {
57
59
  'banner': {
@@ -162,6 +164,7 @@ describe('admaticBidAdapter', () => {
162
164
  'networkId': 10433394,
163
165
  'host': 'layer.serve.admatic.com.tr'
164
166
  },
167
+ 'ortb2Imp': { 'ext': { 'instl': 1 } },
165
168
  'ortb2': { 'badv': ['admatic.com.tr'] },
166
169
  'mediaTypes': {
167
170
  'banner': {
@@ -284,6 +287,7 @@ describe('admaticBidAdapter', () => {
284
287
  'sizes': [[300, 250], [728, 90]]
285
288
  }
286
289
  },
290
+ 'ortb2Imp': { 'ext': { 'instl': 1 } },
287
291
  'ortb2': { 'badv': ['admatic.com.tr'] },
288
292
  getFloor: inputParams => {
289
293
  if (inputParams.mediaType === BANNER && inputParams.size[0] === 300 && inputParams.size[1] === 250) {
@@ -308,6 +312,7 @@ describe('admaticBidAdapter', () => {
308
312
  'networkId': 10433394,
309
313
  'host': 'layer.serve.admatic.com.tr'
310
314
  },
315
+ 'ortb2Imp': { 'ext': { 'instl': 1 } },
311
316
  'ortb2': { 'badv': ['admatic.com.tr'] },
312
317
  'adUnitCode': 'adunit-code',
313
318
  'sizes': [[300, 250], [728, 90]],
@@ -1,5 +1,6 @@
1
- import { adqueryIdSubmodule, storage } from 'modules/adqueryIdSystem.js';
2
- import { server } from 'test/mocks/xhr.js';
1
+ import {adqueryIdSubmodule, storage} from 'modules/adqueryIdSystem.js';
2
+ import {server} from 'test/mocks/xhr.js';
3
+ import sinon from 'sinon';
3
4
 
4
5
  const config = {
5
6
  storage: {
@@ -18,7 +19,7 @@ describe('AdqueryIdSystem', function () {
18
19
  });
19
20
  });
20
21
 
21
- describe('getId', function() {
22
+ describe('getId', function () {
22
23
  let getDataFromLocalStorageStub;
23
24
 
24
25
  beforeEach(function() {
@@ -29,7 +30,7 @@ describe('AdqueryIdSystem', function () {
29
30
  getDataFromLocalStorageStub.restore();
30
31
  });
31
32
 
32
- it('gets a adqueryId', function() {
33
+ it('gets a adqueryId', function () {
33
34
  const config = {
34
35
  params: {}
35
36
  };
@@ -37,36 +38,24 @@ describe('AdqueryIdSystem', function () {
37
38
  const callback = adqueryIdSubmodule.getId(config).callback;
38
39
  callback(callbackSpy);
39
40
  const request = server.requests[0];
40
- expect(request.url).to.eq(`https://bidder.adquery.io/prebid/qid`);
41
- request.respond(200, { 'Content-Type': 'application/json' }, JSON.stringify({ qid: 'qid' }));
42
- expect(callbackSpy.lastCall.lastArg).to.deep.equal({qid: 'qid'});
41
+ expect(request.url).to.contains(`https://bidder.adquery.io/prebid/qid?qid=`);
42
+ request.respond(200, {'Content-Type': 'application/json'}, JSON.stringify({qid: '6dd9eab7dfeab7df6dd9ea'}));
43
+ expect(callbackSpy.lastCall.lastArg).to.deep.equal('6dd9eab7dfeab7df6dd9ea');
43
44
  });
44
45
 
45
- it('gets a cached adqueryId', function() {
46
- const config = {
47
- params: {}
48
- };
49
- getDataFromLocalStorageStub.withArgs('qid').returns('qid');
50
-
51
- const callbackSpy = sinon.spy();
52
- const callback = adqueryIdSubmodule.getId(config).callback;
53
- callback(callbackSpy);
54
- expect(callbackSpy.lastCall.lastArg).to.deep.equal({qid: 'qid'});
55
- });
56
-
57
- it('allows configurable id url', function() {
46
+ it('allows configurable id url', function () {
58
47
  const config = {
59
48
  params: {
60
- url: 'https://bidder.adquery.io'
49
+ url: 'https://another_bidder.adquery.io/qid'
61
50
  }
62
51
  };
63
52
  const callbackSpy = sinon.spy();
64
53
  const callback = adqueryIdSubmodule.getId(config).callback;
65
54
  callback(callbackSpy);
66
55
  const request = server.requests[0];
67
- expect(request.url).to.eq('https://bidder.adquery.io');
68
- request.respond(200, { 'Content-Type': 'application/json' }, JSON.stringify({ qid: 'testqid' }));
69
- expect(callbackSpy.lastCall.lastArg).to.deep.equal({qid: 'testqid'});
56
+ expect(request.url).to.contains('https://another_bidder.adquery.io');
57
+ request.respond(200, {'Content-Type': 'application/json'}, JSON.stringify({qid: 'testqid'}));
58
+ expect(callbackSpy.lastCall.lastArg).to.deep.equal('testqid');
70
59
  });
71
60
  });
72
61
  });
@@ -245,18 +245,31 @@ describe('#bidViewability', function() {
245
245
  let logWinningBidNotFoundSpy;
246
246
  let callBidViewableBidderSpy;
247
247
  let winningBidsArray;
248
+ let callBidBillableBidderSpy;
249
+ let adUnits = [
250
+ {
251
+ 'code': 'abc123',
252
+ 'bids': [
253
+ {
254
+ 'bidder': 'pubmatic'
255
+ }
256
+ ]
257
+ }
258
+ ];
248
259
 
249
260
  beforeEach(function() {
250
261
  sandbox = sinon.sandbox.create();
251
262
  triggerPixelSpy = sandbox.spy(utils, ['triggerPixel']);
252
263
  eventsEmitSpy = sandbox.spy(events, ['emit']);
253
264
  callBidViewableBidderSpy = sandbox.spy(adapterManager, ['callBidViewableBidder']);
265
+ callBidBillableBidderSpy = sandbox.spy(adapterManager, ['callBidBillableBidder']);
254
266
  // mocking winningBidsArray
255
267
  winningBidsArray = [];
256
268
  sandbox.stub(prebidGlobal, 'getGlobal').returns({
257
269
  getAllWinningBids: function (number) {
258
270
  return winningBidsArray;
259
- }
271
+ },
272
+ adUnits
260
273
  });
261
274
  });
262
275
 
@@ -293,5 +306,23 @@ describe('#bidViewability', function() {
293
306
  // CONSTANTS.EVENTS.BID_VIEWABLE is NOT triggered
294
307
  expect(eventsEmitSpy.callCount).to.equal(0);
295
308
  });
309
+
310
+ it('should call the callBidBillableBidder function if the viewable bid is associated with an ad unit with deferBilling set to true', function() {
311
+ let moduleConfig = {};
312
+ const deferredBillingAdUnit = {
313
+ 'code': '/harshad/Jan/2021/',
314
+ 'deferBilling': true,
315
+ 'bids': [
316
+ {
317
+ 'bidder': 'pubmatic'
318
+ }
319
+ ]
320
+ };
321
+ adUnits.push(deferredBillingAdUnit);
322
+ winningBidsArray.push(PBJS_WINNING_BID);
323
+ bidViewability.impressionViewableHandler(moduleConfig, GPT_SLOT, null);
324
+ expect(callBidBillableBidderSpy.callCount).to.equal(1);
325
+ sinon.assert.calledWith(callBidBillableBidderSpy, PBJS_WINNING_BID);
326
+ });
296
327
  });
297
328
  });
@@ -67,6 +67,8 @@ const NO_USP_CONSENT = {
67
67
  usp: '1NYY'
68
68
  };
69
69
 
70
+ const UNDEFINED_USER_CONSENT = {};
71
+
70
72
  function mockSurveyLoaded(surveyConf) {
71
73
  const commands = window._brandmetrics || [];
72
74
  commands.forEach(command => {
@@ -120,6 +122,10 @@ describe('BrandmetricsRTD module', () => {
120
122
  it('should not init when there is no usp- consent', () => {
121
123
  expect(brandmetricsRTD.brandmetricsSubmodule.init(VALID_CONFIG, NO_USP_CONSENT)).to.equal(false);
122
124
  });
125
+
126
+ it('should init if there are no consent- objects defined', () => {
127
+ expect(brandmetricsRTD.brandmetricsSubmodule.init(VALID_CONFIG, UNDEFINED_USER_CONSENT)).to.equal(true);
128
+ });
123
129
  });
124
130
 
125
131
  describe('getBidRequestData', () => {