prebid.js 9.46.0 → 9.48.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 (325) hide show
  1. package/.github/codeql/queries/jsonRequestContentType.ql +18 -0
  2. package/AGENTS.md +42 -0
  3. package/CLAUDE.md +1 -0
  4. package/babelConfig.js +1 -1
  5. package/dist/33acrossAnalyticsAdapter.js +1 -1
  6. package/dist/33acrossBidAdapter.js +1 -1
  7. package/dist/33acrossIdSystem.js +1 -1
  8. package/dist/BTBidAdapter.js +1 -1
  9. package/dist/adagioAnalyticsAdapter.js +1 -1
  10. package/dist/adagioBidAdapter.js +1 -1
  11. package/dist/adagioUtils.js +1 -1
  12. package/dist/addefendBidAdapter.js +1 -1
  13. package/dist/adgenerationBidAdapter.js +1 -1
  14. package/dist/adlooxRtdProvider.js +1 -1
  15. package/dist/adqueryBidAdapter.js +1 -1
  16. package/dist/adrelevantisBidAdapter.js +1 -1
  17. package/dist/adstirBidAdapter.js +1 -1
  18. package/dist/adtrgtmeBidAdapter.js +1 -1
  19. package/dist/advangUtils.js +1 -1
  20. package/dist/adverxoBidAdapter.js +1 -1
  21. package/dist/adxcgAnalyticsAdapter.js +1 -1
  22. package/dist/adxcgBidAdapter.js +1 -1
  23. package/dist/adyoulikeBidAdapter.js +1 -1
  24. package/dist/agmaAnalyticsAdapter.js +1 -1
  25. package/dist/ajaBidAdapter.js +1 -1
  26. package/dist/amxBidAdapter.js +1 -1
  27. package/dist/amxIdSystem.js +1 -1
  28. package/dist/aniviewBidAdapter.js +1 -1
  29. package/dist/appierAnalyticsAdapter.js +1 -1
  30. package/dist/appnexusBidAdapter.js +1 -1
  31. package/dist/asoBidAdapter.js +1 -1
  32. package/dist/axonixBidAdapter.js +1 -1
  33. package/dist/beopBidAdapter.js +1 -1
  34. package/dist/bidglassBidAdapter.js +1 -1
  35. package/dist/big-richmediaBidAdapter.js +1 -1
  36. package/dist/bitmediaBidAdapter.js +1 -1
  37. package/dist/blueBidAdapter.js +1 -1
  38. package/dist/blueUtils.js +1 -0
  39. package/dist/bmsBidAdapter.js +1 -1
  40. package/dist/bridBidAdapter.js +1 -1
  41. package/dist/bridgeuppBidAdapter.js +1 -1
  42. package/dist/bridgewellBidAdapter.js +1 -1
  43. package/dist/brightMountainMediaBidAdapter.js +1 -1
  44. package/dist/browsiUtils.js +1 -1
  45. package/dist/carodaBidAdapter.js +1 -1
  46. package/dist/chtnwBidAdapter.js +1 -1
  47. package/dist/chunk-core.js +1 -1
  48. package/dist/concertBidAdapter.js +1 -1
  49. package/dist/connectadBidAdapter.js +1 -1
  50. package/dist/consumableBidAdapter.js +1 -1
  51. package/dist/contxtfulBidAdapter.js +1 -1
  52. package/dist/conversantAnalyticsAdapter.js +1 -1
  53. package/dist/conversantBidAdapter.js +1 -1
  54. package/dist/craftBidAdapter.js +1 -1
  55. package/dist/criteoBidAdapter.js +1 -1
  56. package/dist/cwireBidAdapter.js +1 -1
  57. package/dist/czechAdIdSystem.js +1 -1
  58. package/dist/dailymotionBidAdapter.js +1 -1
  59. package/dist/debugging-standalone.js +1 -1
  60. package/dist/dependencies.json +16 -2
  61. package/dist/dspxBidAdapter.js +1 -1
  62. package/dist/dxkultureBidAdapter.js +1 -1
  63. package/dist/dynamicAdBoostRtdProvider.js +1 -1
  64. package/dist/eplanningBidAdapter.js +1 -1
  65. package/dist/eskimiBidAdapter.js +1 -1
  66. package/dist/euidIdSystem.js +1 -1
  67. package/dist/exadsBidAdapter.js +1 -1
  68. package/dist/excoBidAdapter.js +1 -1
  69. package/dist/feedadBidAdapter.js +1 -1
  70. package/dist/finativeBidAdapter.js +1 -1
  71. package/dist/freewheel-sspBidAdapter.js +1 -1
  72. package/dist/gmosspBidAdapter.js +1 -1
  73. package/dist/gptUtils.js +1 -1
  74. package/dist/greenbidsAnalyticsAdapter.js +1 -1
  75. package/dist/greenbidsBidAdapter.js +1 -1
  76. package/dist/greenbidsRtdProvider.js +1 -1
  77. package/dist/gridBidAdapter.js +1 -1
  78. package/dist/gumgumBidAdapter.js +1 -1
  79. package/dist/h12mediaBidAdapter.js +1 -1
  80. package/dist/hypelabBidAdapter.js +1 -1
  81. package/dist/id5AnalyticsAdapter.js +1 -1
  82. package/dist/id5IdSystem.js +1 -1
  83. package/dist/imdsBidAdapter.js +1 -1
  84. package/dist/improvedigitalBidAdapter.js +1 -1
  85. package/dist/inmobiBidAdapter.js +1 -1
  86. package/dist/insticatorBidAdapter.js +1 -1
  87. package/dist/intentIqAnalyticsAdapter.js +1 -1
  88. package/dist/ixBidAdapter.js +1 -1
  89. package/dist/jixieBidAdapter.js +1 -1
  90. package/dist/justpremiumBidAdapter.js +1 -1
  91. package/dist/kargoBidAdapter.js +1 -1
  92. package/dist/kimberliteBidAdapter.js +1 -1
  93. package/dist/konduitAnalyticsAdapter.js +1 -1
  94. package/dist/kueezBidAdapter.js +1 -1
  95. package/dist/lassoBidAdapter.js +1 -1
  96. package/dist/lifestreetBidAdapter.js +1 -1
  97. package/dist/liveIntentId.js +1 -1
  98. package/dist/logicadBidAdapter.js +1 -1
  99. package/dist/loglyliftBidAdapter.js +1 -1
  100. package/dist/luceadBidAdapter.js +1 -1
  101. package/dist/luponmediaBidAdapter.js +1 -1
  102. package/dist/mabidderBidAdapter.js +1 -1
  103. package/dist/madsenseBidAdapter.js +1 -1
  104. package/dist/magniteAnalyticsAdapter.js +1 -1
  105. package/dist/malltvAnalyticsAdapter.js +1 -1
  106. package/dist/marsmediaBidAdapter.js +1 -1
  107. package/dist/mediafuseBidAdapter.js +1 -1
  108. package/dist/medianetBidAdapter.js +1 -1
  109. package/dist/medianetUtils.js +1 -1
  110. package/dist/mediasquareBidAdapter.js +1 -1
  111. package/dist/mgidBidAdapter.js +1 -1
  112. package/dist/missenaBidAdapter.js +1 -1
  113. package/dist/mobilefuseBidAdapter.js +1 -1
  114. package/dist/nativeryBidAdapter.js +1 -0
  115. package/dist/nextMillenniumBidAdapter.js +1 -1
  116. package/dist/nexx360Utils.js +1 -1
  117. package/dist/nobidAnalyticsAdapter.js +1 -1
  118. package/dist/nobidBidAdapter.js +1 -1
  119. package/dist/nodalsAiRtdProvider.js +1 -1
  120. package/dist/not-for-prod/prebid.js +187 -184
  121. package/dist/oguryBidAdapter.js +1 -1
  122. package/dist/onetagBidAdapter.js +1 -1
  123. package/dist/ooloAnalyticsAdapter.js +1 -1
  124. package/dist/openxBidAdapter.js +1 -1
  125. package/dist/optidigitalBidAdapter.js +1 -1
  126. package/dist/orbidderBidAdapter.js +1 -1
  127. package/dist/outbrainBidAdapter.js +1 -1
  128. package/dist/pinkLionBidAdapter.js +1 -0
  129. package/dist/pixfutureBidAdapter.js +1 -1
  130. package/dist/prebidServerBidAdapter.js +1 -1
  131. package/dist/priceFloors.js +1 -1
  132. package/dist/publinkIdSystem.js +1 -1
  133. package/dist/pubmaticAnalyticsAdapter.js +1 -1
  134. package/dist/pubmaticBidAdapter.js +1 -1
  135. package/dist/pubmaticRtdProvider.js +1 -1
  136. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  137. package/dist/pubxaiAnalyticsAdapter.js +1 -1
  138. package/dist/pubxaiRtdProvider.js +1 -1
  139. package/dist/pxyzBidAdapter.js +1 -1
  140. package/dist/quantcastBidAdapter.js +1 -1
  141. package/dist/readpeakBidAdapter.js +1 -1
  142. package/dist/relaidoBidAdapter.js +1 -1
  143. package/dist/retailspotBidAdapter.js +1 -1
  144. package/dist/rhythmoneBidAdapter.js +1 -1
  145. package/dist/riseUtils.js +1 -1
  146. package/dist/rtbhouseBidAdapter.js +1 -1
  147. package/dist/rubiconBidAdapter.js +1 -1
  148. package/dist/seedingAllianceBidAdapter.js +1 -1
  149. package/dist/seedtagBidAdapter.js +1 -1
  150. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  151. package/dist/sharethroughBidAdapter.js +1 -1
  152. package/dist/showheroes-bsBidAdapter.js +1 -1
  153. package/dist/smaatoBidAdapter.js +1 -1
  154. package/dist/smartadserverBidAdapter.js +1 -1
  155. package/dist/smartxBidAdapter.js +1 -1
  156. package/dist/smilewantedBidAdapter.js +1 -1
  157. package/dist/snigelBidAdapter.js +1 -1
  158. package/dist/sonobiBidAdapter.js +1 -1
  159. package/dist/sovrnBidAdapter.js +1 -1
  160. package/dist/sparteoBidAdapter.js +1 -1
  161. package/dist/sspBCBidAdapter.js +1 -1
  162. package/dist/stroeerCoreBidAdapter.js +1 -1
  163. package/dist/stvBidAdapter.js +1 -1
  164. package/dist/sublimeBidAdapter.js +1 -1
  165. package/dist/taboolaBidAdapter.js +1 -1
  166. package/dist/tappxBidAdapter.js +1 -1
  167. package/dist/targetVideoBidAdapter.js +1 -1
  168. package/dist/teadsBidAdapter.js +1 -1
  169. package/dist/terceptAnalyticsAdapter.js +1 -1
  170. package/dist/themoneytizerBidAdapter.js +1 -1
  171. package/dist/trionBidAdapter.js +1 -1
  172. package/dist/tripleliftBidAdapter.js +1 -1
  173. package/dist/ttdBidAdapter.js +1 -1
  174. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  175. package/dist/uid2IdSystem.js +1 -1
  176. package/dist/underdogmediaBidAdapter.js +1 -1
  177. package/dist/undertoneBidAdapter.js +1 -1
  178. package/dist/unifiedIdSystem.js +1 -1
  179. package/dist/unrulyBidAdapter.js +1 -1
  180. package/dist/userId.js +1 -1
  181. package/dist/vidazooUtils.js +1 -1
  182. package/dist/videobyteBidAdapter.js +1 -1
  183. package/dist/visxBidAdapter.js +1 -1
  184. package/dist/vuukleBidAdapter.js +1 -1
  185. package/dist/weboramaRtdProvider.js +1 -1
  186. package/dist/widespaceBidAdapter.js +1 -1
  187. package/dist/winrBidAdapter.js +1 -1
  188. package/dist/xeUtils.js +1 -1
  189. package/dist/yahooAdsBidAdapter.js +1 -1
  190. package/dist/yandexBidAdapter.js +1 -1
  191. package/dist/yieldmoBidAdapter.js +1 -1
  192. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  193. package/eslint.config.js +1 -3
  194. package/gulpHelpers.js +3 -6
  195. package/gulpfile.js +25 -24
  196. package/karma.conf.maker.js +1 -3
  197. package/libraries/advangUtils/index.js +3 -4
  198. package/libraries/blueUtils/bidderUtils.js +113 -0
  199. package/libraries/browsiUtils/browsiUtils.js +1 -2
  200. package/libraries/gptUtils/gptUtils.js +1 -2
  201. package/libraries/liveIntentId/shared.js +4 -0
  202. package/libraries/xeUtils/bidderUtils.js +3 -4
  203. package/modules/adagioBidAdapter.js +1 -2
  204. package/modules/addefendBidAdapter.md +1 -1
  205. package/modules/adtrgtmeBidAdapter.js +6 -8
  206. package/modules/aduptechBidAdapter.md +1 -1
  207. package/modules/adverxoBidAdapter.js +3 -3
  208. package/modules/blueBidAdapter.js +24 -104
  209. package/modules/bmsBidAdapter.js +25 -105
  210. package/modules/concertBidAdapter.md +1 -1
  211. package/modules/contxtfulBidAdapter.js +56 -10
  212. package/modules/conversantBidAdapter.js +0 -58
  213. package/modules/cwireBidAdapter.js +8 -0
  214. package/modules/czechAdIdSystem.js +13 -3
  215. package/modules/dynamicAdBoostRtdProvider.js +16 -33
  216. package/modules/dynamicAdBoostRtdProvider.md +1 -6
  217. package/modules/ixBidAdapter.js +2 -3
  218. package/modules/luponmediaBidAdapter.js +117 -522
  219. package/modules/luponmediaBidAdapter.md +2 -3
  220. package/modules/mediasquareBidAdapter.js +14 -20
  221. package/modules/microadBidAdapter.js +0 -1
  222. package/modules/nativeryBidAdapter.js +135 -0
  223. package/modules/nativeryBidAdapter.md +95 -0
  224. package/modules/nativoBidAdapter.js +3 -3
  225. package/modules/onetagBidAdapter.js +0 -1
  226. package/modules/pinkLionBidAdapter.js +17 -0
  227. package/modules/pinkLionBidAdapter.md +79 -0
  228. package/modules/prebidServerBidAdapter/ortbConverter.js +1 -1
  229. package/modules/priceFloors.js +2 -2
  230. package/modules/pubmaticBidAdapter.js +4 -1
  231. package/modules/qortexRtdProvider.md +1 -1
  232. package/modules/reconciliationRtdProvider.md +4 -4
  233. package/modules/rtbhouseBidAdapter.js +4 -83
  234. package/modules/rubiconBidAdapter.js +1 -1
  235. package/modules/sspBCBidAdapter.js +1 -1
  236. package/modules/stroeerCoreBidAdapter.js +3 -3
  237. package/modules/stvBidAdapter.js +19 -14
  238. package/modules/topicsFpdModule.md +1 -1
  239. package/modules/unifiedIdSystem.js +8 -1
  240. package/modules/userId/eids.js +15 -0
  241. package/modules/videoModule/index.js +0 -1
  242. package/modules/videoModule/videoImpressionVerifier.js +0 -1
  243. package/modules/yieldlabBidAdapter.js +1 -2
  244. package/modules/yieldmoBidAdapter.js +1 -2
  245. package/package.json +13 -20
  246. package/src/Renderer.js +1 -2
  247. package/src/adapterManager.js +14 -4
  248. package/src/auction.js +2 -3
  249. package/src/config.js +1 -2
  250. package/src/cpmBucketManager.js +1 -2
  251. package/src/secureCreatives.js +2 -3
  252. package/src/targeting.js +1 -2
  253. package/test/fake-server/README.md +3 -3
  254. package/test/helpers/index_adapter_utils.js +2 -2
  255. package/test/helpers/testing-utils.js +1 -1
  256. package/test/spec/auctionmanager_spec.js +2 -3
  257. package/test/spec/fpd/enrichment_spec.js +1 -1
  258. package/test/spec/libraries/greedy/greedyPromise_spec.js +2 -2
  259. package/test/spec/modules/adfBidAdapter_spec.js +1 -1
  260. package/test/spec/modules/adnuntiusBidAdapter_spec.js +25 -9
  261. package/test/spec/modules/adtrgtmeBidAdapter_spec.js +2 -4
  262. package/test/spec/modules/adverxoBidAdapter_spec.js +25 -1
  263. package/test/spec/modules/afpBidAdapter_spec.js +0 -1
  264. package/test/spec/modules/bliinkBidAdapter_spec.js +15 -7
  265. package/test/spec/modules/contxtfulBidAdapter_spec.js +606 -82
  266. package/test/spec/modules/conversantBidAdapter_spec.js +1 -139
  267. package/test/spec/modules/cwireBidAdapter_spec.js +2 -2
  268. package/test/spec/modules/czechAdIdSystem_spec.js +4 -4
  269. package/test/spec/modules/displayioBidAdapter_spec.js +1 -1
  270. package/test/spec/modules/dynamicAdBoostRtdProvider_spec.js +0 -42
  271. package/test/spec/modules/enrichmentLiftMeasurement_spec.js +8 -8
  272. package/test/spec/modules/hypelabBidAdapter_spec.js +17 -11
  273. package/test/spec/modules/iasRtdProvider_spec.js +2 -2
  274. package/test/spec/modules/id5IdSystem_spec.js +1 -1
  275. package/test/spec/modules/idxIdSystem_spec.js +1 -2
  276. package/test/spec/modules/intentIqAnalyticsAdapter_spec.js +25 -25
  277. package/test/spec/modules/intentIqIdSystem_spec.js +32 -32
  278. package/test/spec/modules/kargoBidAdapter_spec.js +11 -5
  279. package/test/spec/modules/liveIntentIdSystem_spec.js +14 -0
  280. package/test/spec/modules/lmpIdSystem_spec.js +1 -2
  281. package/test/spec/modules/lockrAIMIdSystem_spec.js +2 -2
  282. package/test/spec/modules/luceadBidAdapter_spec.js +1 -1
  283. package/test/spec/modules/luponmediaBidAdapter_spec.js +186 -324
  284. package/test/spec/modules/mediaeyesBidAdapter_spec.js +1 -1
  285. package/test/spec/modules/mediakeysBidAdapter_spec.js +1 -2
  286. package/test/spec/modules/mediasquareBidAdapter_spec.js +13 -2
  287. package/test/spec/modules/missenaBidAdapter_spec.js +1 -1
  288. package/test/spec/modules/nativeryBidAdapter_spec.js +195 -0
  289. package/test/spec/modules/nexx360BidAdapter_spec.js +6 -6
  290. package/test/spec/modules/oguryBidAdapter_spec.js +2 -2
  291. package/test/spec/modules/omsBidAdapter_spec.js +1 -1
  292. package/test/spec/modules/onetagBidAdapter_spec.js +1 -2
  293. package/test/spec/modules/onomagicBidAdapter_spec.js +2 -2
  294. package/test/spec/modules/overtoneRtdProvider_spec.mjs +1 -1
  295. package/test/spec/modules/permutiveIdentityManagerIdSystem_spec.js +17 -14
  296. package/test/spec/modules/pinkLionBidAdapter_spec.js +480 -0
  297. package/test/spec/modules/prebidServerBidAdapter_spec.js +2 -2
  298. package/test/spec/modules/previousAuctionInfo_spec.js +2 -2
  299. package/test/spec/modules/pubmaticAnalyticsAdapter_spec.js +1 -1
  300. package/test/spec/modules/pubmaticBidAdapter_spec.js +19 -1
  301. package/test/spec/modules/pubmaticRtdProvider_spec.js +16 -17
  302. package/test/spec/modules/pubwiseAnalyticsAdapter_spec.js +2 -2
  303. package/test/spec/modules/rtbhouseBidAdapter_spec.js +0 -182
  304. package/test/spec/modules/rubiconBidAdapter_spec.js +3 -4
  305. package/test/spec/modules/sizeMappingV2_spec.js +1 -1
  306. package/test/spec/modules/sizeMapping_spec.js +2 -3
  307. package/test/spec/modules/stroeerCoreBidAdapter_spec.js +36 -26
  308. package/test/spec/modules/stvBidAdapter_spec.js +108 -40
  309. package/test/spec/modules/topLevelPaapi_spec.js +1 -1
  310. package/test/spec/modules/tpmnBidAdapter_spec.js +1 -1
  311. package/test/spec/modules/ttdBidAdapter_spec.js +1 -1
  312. package/test/spec/modules/unifiedIdSystem_spec.js +20 -0
  313. package/test/spec/modules/userId_spec.js +1 -1
  314. package/test/spec/modules/vibrantmediaBidAdapter_spec.js +1 -1
  315. package/test/spec/modules/videoModule/submodules/videojsVideoProvider_spec.js +1 -1
  316. package/test/spec/modules/yieldmoBidAdapter_spec.js +2 -2
  317. package/test/spec/modules/zeotapIdPlusIdSystem_spec.js +1 -2
  318. package/test/spec/unit/core/adapterManager_spec.js +29 -17
  319. package/test/spec/unit/core/targeting_spec.js +1 -1
  320. package/test/spec/unit/pbjs_api_spec.js +4 -5
  321. package/test/spec/utils_spec.js +20 -12
  322. package/test/test_deps.js +1 -1
  323. package/nightwatch.browserstack.json +0 -46
  324. package/nightwatch.conf.js +0 -36
  325. package/nightwatch.json +0 -40
@@ -1,7 +1,6 @@
1
1
  import {expect} from 'chai';
2
- import {spec, storage} from 'modules/conversantBidAdapter.js';
2
+ import {spec} from 'modules/conversantBidAdapter.js';
3
3
  import * as utils from 'src/utils.js';
4
- import {createEidsArray} from 'modules/userId/eids.js';
5
4
  import {deepAccess} from 'src/utils';
6
5
  // load modules that register ORTB processors
7
6
  import 'src/prebid.js'
@@ -592,35 +591,6 @@ describe('Conversant adapter tests', function() {
592
591
  }
593
592
  })
594
593
 
595
- it('Verify publisher commond id support', function() {
596
- // clone bidRequests
597
- let requests = utils.deepClone(bidRequests);
598
-
599
- // add pubcid to every entry
600
- requests.forEach((unit) => {
601
- Object.assign(unit, {crumbs: {pubcid: 12345}});
602
- });
603
- // construct http post payload
604
- const payload = spec.buildRequests(requests, {}).data;
605
- expect(payload).to.have.deep.nested.property('user.ext.fpc', 12345);
606
- expect(payload).to.not.have.nested.property('user.ext.eids');
607
- });
608
-
609
- it('Verify User ID publisher commond id support', function() {
610
- // clone bidRequests
611
- let requests = utils.deepClone(bidRequests);
612
-
613
- // add pubcid to every entry
614
- requests.forEach((unit) => {
615
- Object.assign(unit, {userId: {pubcid: 67890}});
616
- Object.assign(unit, {userIdAsEids: createEidsArray(unit.userId)});
617
- });
618
- // construct http post payload
619
- const payload = spec.buildRequests(requests, {}).data;
620
- expect(payload).to.have.deep.nested.property('user.ext.fpc', 67890);
621
- expect(payload).to.not.have.nested.property('user.ext.eids');
622
- });
623
-
624
594
  describe('Extended ID', function() {
625
595
  it('Verify unifiedid and liveramp', function() {
626
596
  // clone bidRequests
@@ -637,114 +607,6 @@ describe('Conversant adapter tests', function() {
637
607
  });
638
608
  });
639
609
 
640
- describe('direct reading pubcid', function() {
641
- const ID_NAME = '_pubcid';
642
- const CUSTOM_ID_NAME = 'myid';
643
- const EXP = '_exp';
644
- const TIMEOUT = 2000;
645
-
646
- function cleanUp(key) {
647
- window.document.cookie = key + '=; expires=Thu, 01 Jan 1970 00:00:01 GMT;';
648
- localStorage.removeItem(key);
649
- localStorage.removeItem(key + EXP);
650
- }
651
-
652
- function expStr(timeout) {
653
- return (new Date(Date.now() + timeout * 60 * 60 * 24 * 1000)).toUTCString();
654
- }
655
-
656
- beforeEach(() => {
657
- $$PREBID_GLOBAL$$.bidderSettings = {
658
- conversant: {
659
- storageAllowed: true
660
- }
661
- };
662
- });
663
- afterEach(() => {
664
- $$PREBID_GLOBAL$$.bidderSettings = {};
665
- cleanUp(ID_NAME);
666
- cleanUp(CUSTOM_ID_NAME);
667
- });
668
-
669
- it('reading cookie', function() {
670
- // clone bidRequests
671
- const requests = utils.deepClone(bidRequests);
672
-
673
- // add a pubcid cookie
674
- storage.setCookie(ID_NAME, '12345', expStr(TIMEOUT));
675
-
676
- // construct http post payload
677
- const payload = spec.buildRequests(requests, {}).data;
678
- expect(payload).to.have.deep.nested.property('user.ext.fpc', '12345');
679
- });
680
-
681
- it('reading custom cookie', function() {
682
- // clone bidRequests
683
- const requests = utils.deepClone(bidRequests);
684
- requests[0].params.pubcid_name = CUSTOM_ID_NAME;
685
-
686
- // add a pubcid cookie
687
- storage.setCookie(CUSTOM_ID_NAME, '12345', expStr(TIMEOUT));
688
-
689
- // construct http post payload
690
- const payload = spec.buildRequests(requests, {}).data;
691
- expect(payload).to.have.deep.nested.property('user.ext.fpc', '12345');
692
- });
693
-
694
- it('reading local storage with empty exp time', function() {
695
- // clone bidRequests
696
- const requests = utils.deepClone(bidRequests);
697
-
698
- // add a pubcid in local storage
699
- storage.setDataInLocalStorage(ID_NAME + EXP, '');
700
- storage.setDataInLocalStorage(ID_NAME, 'abcde');
701
-
702
- // construct http post payload
703
- const payload = spec.buildRequests(requests, {}).data;
704
- expect(payload).to.have.deep.nested.property('user.ext.fpc', 'abcde');
705
- });
706
-
707
- it('reading local storage with valid exp time', function() {
708
- // clone bidRequests
709
- const requests = utils.deepClone(bidRequests);
710
-
711
- // add a pubcid in local storage
712
- storage.setDataInLocalStorage(ID_NAME + EXP, expStr(TIMEOUT));
713
- storage.setDataInLocalStorage(ID_NAME, 'fghijk');
714
-
715
- // construct http post payload
716
- const payload = spec.buildRequests(requests, {}).data;
717
- expect(payload).to.have.deep.nested.property('user.ext.fpc', 'fghijk');
718
- });
719
-
720
- it('reading expired local storage', function() {
721
- // clone bidRequests
722
- const requests = utils.deepClone(bidRequests);
723
-
724
- // add a pubcid in local storage
725
- storage.setDataInLocalStorage(ID_NAME + EXP, expStr(-TIMEOUT));
726
- storage.setDataInLocalStorage(ID_NAME, 'lmnopq');
727
-
728
- // construct http post payload
729
- const payload = spec.buildRequests(requests, {}).data;
730
- expect(payload).to.not.have.deep.nested.property('user.ext.fpc');
731
- });
732
-
733
- it('reading local storage with custom name', function() {
734
- // clone bidRequests
735
- const requests = utils.deepClone(bidRequests);
736
- requests[0].params.pubcid_name = CUSTOM_ID_NAME;
737
-
738
- // add a pubcid in local storage
739
- storage.setDataInLocalStorage(CUSTOM_ID_NAME + EXP, expStr(TIMEOUT));
740
- storage.setDataInLocalStorage(CUSTOM_ID_NAME, 'fghijk');
741
-
742
- // construct http post payload
743
- const payload = spec.buildRequests(requests, {}).data;
744
- expect(payload).to.have.deep.nested.property('user.ext.fpc', 'fghijk');
745
- });
746
- });
747
-
748
610
  describe('price floor module', function() {
749
611
  let bidRequest;
750
612
  beforeEach(function() {
@@ -333,7 +333,7 @@ describe('C-WIRE bid adapter', () => {
333
333
  const userSyncs = spec.getUserSyncs(synOptions, {}, gdprConsent, {});
334
334
 
335
335
  expect(userSyncs[0].type).to.equal('image');
336
- expect(userSyncs[0].url).to.equal('https://ib.adnxs.com/getuid?https://prebid.cwi.re/v1/cookiesync?xandrId=$UID&gdpr=0&gdpr_consent=testConsentString');
336
+ expect(userSyncs[0].url).to.equal('https://ib.adnxs.com/getuid?https://prebid.cwi.re/v1/cookiesync?xandrId=$UID&gdpr=0&gdpr_consent=testConsentString');
337
337
  })
338
338
 
339
339
  it('user-syncs with enabled iframe option', function () {
@@ -352,7 +352,7 @@ describe('C-WIRE bid adapter', () => {
352
352
  const userSyncs = spec.getUserSyncs(synOptions, {}, gdprConsent, {});
353
353
 
354
354
  expect(userSyncs[0].type).to.equal('iframe');
355
- expect(userSyncs[0].url).to.equal('https://ib.adnxs.com/getuid?https://prebid.cwi.re/v1/cookiesync?xandrId=$UID&gdpr=1&gdpr_consent=abc123');
355
+ expect(userSyncs[0].url).to.equal('https://ib.adnxs.com/getuid?https://prebid.cwi.re/v1/cookiesync?xandrId=$UID&gdpr=1&gdpr_consent=abc123');
356
356
  })
357
357
  })
358
358
  });
@@ -19,9 +19,9 @@ describe('czechAdId module', function () {
19
19
 
20
20
  describe('getId()', function () {
21
21
  it('should return the uid when it exists in cookie', function () {
22
- getCookieStub.withArgs('czaid').returns('czechAdIdTest');
22
+ getCookieStub.withArgs('czaid').returns('00000000-0000-4000-8000-000000000000');
23
23
  const id = czechAdIdSubmodule.getId();
24
- expect(id).to.be.deep.equal({id: 'czechAdIdTest'});
24
+ expect(id).to.be.deep.equal({id: '00000000-0000-4000-8000-000000000000'});
25
25
  });
26
26
 
27
27
  cookieTestCasesForEmpty.forEach(testCase => it('should not return the uid when it doesnt exist in cookie', function () {
@@ -33,9 +33,9 @@ describe('czechAdId module', function () {
33
33
 
34
34
  describe('decode()', function () {
35
35
  it('should return the uid when it exists in cookie', function () {
36
- getCookieStub.withArgs('czaid').returns('czechAdIdTest');
36
+ getCookieStub.withArgs('czaid').returns('00000000-0000-4000-8000-000000000000');
37
37
  const decoded = czechAdIdSubmodule.decode();
38
- expect(decoded).to.be.deep.equal({czechAdId: 'czechAdIdTest'});
38
+ expect(decoded).to.be.deep.equal({czechAdId: '00000000-0000-4000-8000-000000000000'});
39
39
  });
40
40
  });
41
41
  describe('eid', () => {
@@ -1,5 +1,5 @@
1
1
  import {spec} from 'modules/displayioBidAdapter.js'
2
- import {BANNER} from '/src/mediaTypes'
2
+ import {BANNER} from '../../../src/mediaTypes.js'
3
3
 
4
4
  describe('Displayio adapter', function () {
5
5
  const BIDDER = 'displayio'
@@ -1,48 +1,6 @@
1
1
  import { subModuleObj as rtdProvider } from 'modules/dynamicAdBoostRtdProvider.js';
2
- import { loadExternalScript } from '../../../src/adloader.js';
3
2
  import { expect } from 'chai';
4
3
 
5
- const configWithParams = {
6
- params: {
7
- keyId: 'dynamic',
8
- adUnits: ['gpt-123'],
9
- threshold: 1
10
- }
11
- };
12
-
13
- const configWithoutRequiredParams = {
14
- params: {
15
- keyId: ''
16
- }
17
- };
18
-
19
- describe('dynamicAdBoost', function() {
20
- let clock;
21
- let sandbox;
22
- beforeEach(function () {
23
- sandbox = sinon.sandbox.create();
24
- clock = sandbox.useFakeTimers(Date.now());
25
- });
26
- afterEach(function () {
27
- sandbox.restore();
28
- });
29
- describe('init', function() {
30
- describe('initialize without expected params', function() {
31
- it('fails initalize when keyId is not present', function() {
32
- expect(rtdProvider.init(configWithoutRequiredParams)).to.be.false;
33
- })
34
- })
35
-
36
- describe('initialize with expected params', function() {
37
- it('successfully initialize with load script', function() {
38
- expect(rtdProvider.init(configWithParams)).to.be.true;
39
- clock.tick(1000);
40
- expect(loadExternalScript.called).to.be.true;
41
- })
42
- });
43
- });
44
- })
45
-
46
4
  describe('markViewed tests', function() {
47
5
  let sandbox;
48
6
  const mockObserver = {
@@ -19,7 +19,7 @@ describe('enrichmentLiftMeasurement', () => {
19
19
  config.resetConfig();
20
20
  reset();
21
21
  })
22
-
22
+
23
23
  it('should properly split traffic basing on percentage', () => {
24
24
  const TEST_SAMPLE_SIZE = 1000;
25
25
  const MARGIN_OF_ERROR = 0.05;
@@ -56,13 +56,13 @@ describe('enrichmentLiftMeasurement', () => {
56
56
 
57
57
  mathRandomStub.restore();
58
58
  });
59
-
59
+
60
60
  describe('should register activity based on suppression param', () => {
61
61
  Object.entries({
62
62
  [suppressionMethod.EIDS]: false,
63
63
  [suppressionMethod.SUBMODULES]: true
64
64
  }).forEach(([method, value]) => {
65
- it(method, () => {
65
+ it(method, () => {
66
66
  config.setConfig({ enrichmentLiftMeasurement: {
67
67
  suppression: method,
68
68
  modules: [
@@ -123,7 +123,7 @@ describe('enrichmentLiftMeasurement', () => {
123
123
  sessionStorageIsEnabled: () => true,
124
124
  getDataFromSessionStorage: sinon.stub().returns(null),
125
125
  setDataInSessionStorage: sinon.stub()
126
- };
126
+ };
127
127
  init(fakeStorageManager);
128
128
  sinon.assert.calledOnce(fakeStorageManager.setDataInSessionStorage);
129
129
  sinon.assert.calledOnce(getCalculatedSubmodulesStub);
@@ -148,7 +148,7 @@ describe('enrichmentLiftMeasurement', () => {
148
148
  storeSplits: storeSplitsMethod.SESSION_STORAGE,
149
149
  modules: mockConfig.map(module => ({...module, percentage: 0.1}))
150
150
  }});
151
-
151
+
152
152
  init(fakeStorageManager);
153
153
 
154
154
  sinon.assert.calledOnce(fakeStorageManager.setDataInSessionStorage);
@@ -168,7 +168,7 @@ describe('enrichmentLiftMeasurement', () => {
168
168
  testRun: TEST_RUN_ID,
169
169
  storeSplits: storeSplitsMethod.PAGE
170
170
  }});
171
-
171
+
172
172
  init();
173
173
 
174
174
  const eventType = EVENTS.BID_WON;
@@ -189,7 +189,7 @@ describe('enrichmentLiftMeasurement', () => {
189
189
  };
190
190
  const stringifiedConfig = JSON.stringify(expectedResult);
191
191
 
192
- Object.entries({
192
+ Object.entries({
193
193
  [LOCAL_STORAGE]: localStorage,
194
194
  [SESSION_STORAGE]: sessionStorage,
195
195
  }).forEach(([method, storage]) => {
@@ -206,7 +206,7 @@ describe('enrichmentLiftMeasurement', () => {
206
206
  const { LOCAL_STORAGE, SESSION_STORAGE } = storeSplitsMethod;
207
207
  const TEST_RUN_ID = 'ExperimentA';
208
208
 
209
- Object.entries({
209
+ Object.entries({
210
210
  [LOCAL_STORAGE]: localStorage,
211
211
  [SESSION_STORAGE]: sessionStorage,
212
212
  }).forEach(([method, storage]) => {
@@ -114,11 +114,11 @@ const mockBidRequest = {
114
114
 
115
115
  describe('hypelabBidAdapter', function () {
116
116
  describe('mediaSize', function () {
117
- describe('when given an invalid media object', function () {
117
+ it('when given an invalid media object', function () {
118
118
  expect(mediaSize({})).to.eql({ width: 0, height: 0 });
119
119
  });
120
120
 
121
- describe('when given a valid media object', function () {
121
+ it('when given a valid media object', function () {
122
122
  expect(
123
123
  mediaSize({ creative_set: { image: { width: 728, height: 90 } } })
124
124
  ).to.eql({ width: 728, height: 90 });
@@ -126,29 +126,35 @@ describe('hypelabBidAdapter', function () {
126
126
  });
127
127
 
128
128
  describe('isBidRequestValid', function () {
129
- describe('when given an invalid bid request', function () {
129
+ it('when given an invalid bid request', function () {
130
130
  expect(spec.isBidRequestValid({})).to.equal(false);
131
131
  });
132
132
 
133
- describe('when given a valid bid request', function () {
133
+ it('when given a valid bid request', function () {
134
134
  expect(spec.isBidRequestValid(mockValidBidRequest)).to.equal(true);
135
135
  });
136
136
  });
137
137
 
138
138
  describe('Bidder code valid', function () {
139
- expect(spec.code).to.equal(BIDDER_CODE);
139
+ it('should match BIDDER_CODE', function () {
140
+ expect(spec.code).to.equal(BIDDER_CODE);
141
+ });
140
142
  });
141
143
 
142
144
  describe('Media types valid', function () {
143
- expect(spec.supportedMediaTypes).to.contain(BANNER);
145
+ it('should contain BANNER', function () {
146
+ expect(spec.supportedMediaTypes).to.contain(BANNER);
147
+ });
144
148
  });
145
149
 
146
150
  describe('Bid request valid', function () {
147
- expect(spec.isBidRequestValid(mockValidBidRequest)).to.equal(true);
151
+ it('should validate correctly', function () {
152
+ expect(spec.isBidRequestValid(mockValidBidRequest)).to.equal(true);
153
+ });
148
154
  });
149
155
 
150
156
  describe('buildRequests', () => {
151
- describe('returns a valid request', function () {
157
+ it('returns a valid request', function () {
152
158
  const result = spec.buildRequests(
153
159
  mockValidBidRequests,
154
160
  mockBidderRequest
@@ -200,7 +206,7 @@ describe('hypelabBidAdapter', function () {
200
206
  expect(data.pp).to.deep.equal(null);
201
207
  });
202
208
 
203
- describe('should set uuid to the first id in userIdAsEids', () => {
209
+ it('should set uuid to the first id in userIdAsEids', () => {
204
210
  mockValidBidRequests[0].userIdAsEids = [
205
211
  {
206
212
  source: 'pubcid.org',
@@ -231,7 +237,7 @@ describe('hypelabBidAdapter', function () {
231
237
  });
232
238
 
233
239
  describe('interpretResponse', () => {
234
- describe('successfully interpret a valid response', function () {
240
+ it('successfully interpret a valid response', function () {
235
241
  const result = spec.interpretResponse(mockServerResponse, mockBidRequest);
236
242
 
237
243
  expect(result).to.be.an('array');
@@ -252,7 +258,7 @@ describe('hypelabBidAdapter', function () {
252
258
  expect(data.meta.advertiserDomains[0]).to.be.a('string');
253
259
  });
254
260
 
255
- describe('should return a blank array if cpm is not set', () => {
261
+ it('should return a blank array if cpm is not set', () => {
256
262
  mockServerResponse.body.data.cpm = undefined;
257
263
  const result = spec.interpretResponse(mockServerResponse, mockBidRequest);
258
264
  expect(result).to.eql([]);
@@ -181,7 +181,7 @@ describe('iasRtdProvider is a RTD provider that', function () {
181
181
  });
182
182
  it('it merges response data', function () {
183
183
  const callback = sinon.spy();
184
-
184
+
185
185
  iasSubModule.getBidRequestData({
186
186
  adUnits: [
187
187
  {code: 'adunit-1'},
@@ -201,7 +201,7 @@ describe('iasRtdProvider is a RTD provider that', function () {
201
201
  expect(targeting1['adunit-2']['adt']).to.be.eq('veryLow');
202
202
  expect(targeting1['adunit-2']['fr']).to.be.eq('false');
203
203
  expect(targeting1['adunit-2']['ias_id']).to.be.eq('id2');
204
-
204
+
205
205
  iasSubModule.getBidRequestData({
206
206
  adUnits: [
207
207
  {code: 'adunit-2'},
@@ -26,7 +26,7 @@ describe('ID5 ID System', function () {
26
26
  });
27
27
  after(function () {
28
28
  logInfoStub.restore();
29
- });
29
+ });
30
30
  const ID5_MODULE_NAME = 'id5Id';
31
31
  const ID5_EIDS_NAME = ID5_MODULE_NAME.toLowerCase();
32
32
  const ID5_SOURCE = 'id5-sync.com';
@@ -1,5 +1,4 @@
1
1
  import { expect } from 'chai';
2
- import {find} from 'src/polyfill.js';
3
2
  import { config } from 'src/config.js';
4
3
  import { init, startAuctionHook, setSubmoduleRegistry } from 'modules/userId/index.js';
5
4
  import { storage, idxIdSubmodule } from 'modules/idxIdSystem.js';
@@ -114,7 +113,7 @@ describe('IDx ID System', () => {
114
113
  unit.bids.forEach(bid => {
115
114
  expect(bid).to.have.deep.nested.property('userId.idx');
116
115
  expect(bid.userId.idx).to.equal(IDX_DUMMY_VALUE);
117
- const idxIdAsEid = find(bid.userIdAsEids, e => e.source == 'idx.lat');
116
+ const idxIdAsEid = bid.userIdAsEids.find(e => e.source == 'idx.lat');
118
117
  expect(idxIdAsEid).to.deep.equal({
119
118
  source: 'idx.lat',
120
119
  uids: [{
@@ -141,19 +141,19 @@ describe('IntentIQ tests all', function () {
141
141
  it('should send POST request with payload in request body if reportMethod is POST', function () {
142
142
  const [userConfig] = getUserConfig();
143
143
  userConfig.params.reportMethod = 'POST';
144
-
144
+
145
145
  config.getConfig.restore();
146
146
  sinon.stub(config, 'getConfig').withArgs('userSync.userIds').returns([userConfig]);
147
-
147
+
148
148
  localStorage.setItem(FIRST_PARTY_KEY, defaultData);
149
-
149
+
150
150
  events.emit(EVENTS.BID_WON, wonRequest);
151
-
151
+
152
152
  const request = server.requests[0];
153
-
153
+
154
154
  const expectedData = preparePayload(wonRequest);
155
155
  const expectedPayload = `["${btoa(JSON.stringify(expectedData))}"]`;
156
-
156
+
157
157
  expect(request.method).to.equal('POST');
158
158
  expect(request.requestBody).to.equal(expectedPayload);
159
159
  });
@@ -162,25 +162,25 @@ describe('IntentIQ tests all', function () {
162
162
  const [userConfig] = getUserConfig();
163
163
  config.getConfig.restore();
164
164
  sinon.stub(config, 'getConfig').withArgs('userSync.userIds').returns([userConfig]);
165
-
165
+
166
166
  localStorage.setItem(FIRST_PARTY_KEY, defaultData);
167
167
  events.emit(EVENTS.BID_WON, wonRequest);
168
-
168
+
169
169
  const request = server.requests[0];
170
-
170
+
171
171
  expect(request.method).to.equal('GET');
172
-
172
+
173
173
  const url = new URL(request.url);
174
174
  const payloadEncoded = url.searchParams.get('payload');
175
175
  const decoded = JSON.parse(atob(JSON.parse(payloadEncoded)[0]));
176
-
176
+
177
177
  const expected = preparePayload(wonRequest);
178
-
178
+
179
179
  expect(decoded.partnerId).to.equal(expected.partnerId);
180
180
  expect(decoded.adType).to.equal(expected.adType);
181
181
  expect(decoded.prebidAuctionId).to.equal(expected.prebidAuctionId);
182
182
  });
183
-
183
+
184
184
  it('IIQ Analytical Adapter bid win report', function () {
185
185
  localStorage.setItem(FIRST_PARTY_KEY, defaultData);
186
186
  getWindowLocationStub = sinon.stub(utils, 'getWindowLocation').returns({href: 'http://localhost:9876'});
@@ -430,8 +430,8 @@ describe('IntentIQ tests all', function () {
430
430
  });
431
431
 
432
432
  it('should include source parameter in report URL', function () {
433
- localStorage.setItem(FIRST_PARTY_KEY, JSON.stringify(defaultData));
434
-
433
+ localStorage.setItem(FIRST_PARTY_KEY, JSON.stringify(defaultData));
434
+
435
435
  events.emit(EVENTS.BID_WON, wonRequest);
436
436
  const request = server.requests[0];
437
437
 
@@ -462,17 +462,17 @@ describe('IntentIQ tests all', function () {
462
462
  parameterValue: 'Lee',
463
463
  destination: [0, 0, 1]
464
464
  }];
465
-
465
+
466
466
  config.getConfig.restore();
467
467
  sinon.stub(config, 'getConfig').withArgs('userSync.userIds').returns(userConfig);
468
-
468
+
469
469
  localStorage.setItem(FIRST_PARTY_KEY, defaultData);
470
470
  events.emit(EVENTS.BID_WON, wonRequest);
471
-
471
+
472
472
  const request = server.requests[0];
473
473
  expect(request.url).to.include('general=Lee');
474
474
  });
475
-
475
+
476
476
  it('should not send additionalParams in report if value is too large', function () {
477
477
  const longVal = 'x'.repeat(5000000);
478
478
  const userConfig = getUserConfig();
@@ -481,21 +481,21 @@ describe('IntentIQ tests all', function () {
481
481
  parameterValue: longVal,
482
482
  destination: [0, 0, 1]
483
483
  }];
484
-
484
+
485
485
  config.getConfig.restore();
486
486
  sinon.stub(config, 'getConfig').withArgs('userSync.userIds').returns(userConfig);
487
-
487
+
488
488
  localStorage.setItem(FIRST_PARTY_KEY, defaultData);
489
489
  events.emit(EVENTS.BID_WON, wonRequest);
490
-
490
+
491
491
  const request = server.requests[0];
492
492
  expect(request.url).not.to.include('general');
493
- });
493
+ });
494
494
  it('should include spd parameter from LS in report URL', function () {
495
495
  const spdObject = { foo: 'bar', value: 42 };
496
496
  const expectedSpdEncoded = encodeURIComponent(JSON.stringify(spdObject));
497
497
 
498
- localStorage.setItem(FIRST_PARTY_KEY, JSON.stringify({...defaultData, spd: spdObject}));
498
+ localStorage.setItem(FIRST_PARTY_KEY, JSON.stringify({...defaultData, spd: spdObject}));
499
499
  getWindowLocationStub = sinon.stub(utils, 'getWindowLocation').returns({ href: 'http://localhost:9876/' });
500
500
 
501
501
  events.emit(EVENTS.BID_WON, wonRequest);
@@ -510,7 +510,7 @@ describe('IntentIQ tests all', function () {
510
510
  const spdObject = 'server provided data';
511
511
  const expectedSpdEncoded = encodeURIComponent(spdObject);
512
512
 
513
- localStorage.setItem(FIRST_PARTY_KEY, JSON.stringify({...defaultData, spd: spdObject}));
513
+ localStorage.setItem(FIRST_PARTY_KEY, JSON.stringify({...defaultData, spd: spdObject}));
514
514
  getWindowLocationStub = sinon.stub(utils, 'getWindowLocation').returns({ href: 'http://localhost:9876/' });
515
515
 
516
516
  events.emit(EVENTS.BID_WON, wonRequest);