prebid.js 7.10.0 → 7.13.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 (366) hide show
  1. package/.github/PULL_REQUEST_TEMPLATE.md +16 -10
  2. package/.github/codeql/codeql-config.yml +4 -0
  3. package/.github/workflows/codeql-analysis.yml +73 -0
  4. package/.github/workflows/issue_tracker.yml +1 -1
  5. package/README.md +0 -2
  6. package/babelConfig.js +10 -4
  7. package/dist/33acrossBidAdapter.js +1 -1
  8. package/dist/acuityAdsBidAdapter.js +1 -0
  9. package/dist/adagioBidAdapter.js +1 -1
  10. package/dist/adbookpspBidAdapter.js +1 -1
  11. package/dist/adgenerationBidAdapter.js +1 -1
  12. package/dist/adkernelBidAdapter.js +1 -1
  13. package/dist/adrelevantisBidAdapter.js +1 -1
  14. package/dist/adriverBidAdapter.js +1 -1
  15. package/dist/adriverIdSystem.js +1 -1
  16. package/dist/adtelligentBidAdapter.js +1 -1
  17. package/dist/adtrgtmeBidAdapter.js +1 -0
  18. package/dist/adxcgBidAdapter.js +1 -1
  19. package/dist/adyoulikeBidAdapter.js +1 -1
  20. package/dist/ajaBidAdapter.js +1 -1
  21. package/dist/alkimiBidAdapter.js +1 -1
  22. package/dist/amxBidAdapter.js +1 -1
  23. package/dist/amxIdSystem.js +1 -1
  24. package/dist/aniviewBidAdapter.js +1 -1
  25. package/dist/aolBidAdapter.js +1 -1
  26. package/dist/appierAnalyticsAdapter.js +1 -1
  27. package/dist/appnexusBidAdapter.js +1 -1
  28. package/dist/asoBidAdapter.js +1 -1
  29. package/dist/audiencerunBidAdapter.js +1 -1
  30. package/dist/axonixBidAdapter.js +1 -1
  31. package/dist/beopBidAdapter.js +1 -1
  32. package/dist/betweenBidAdapter.js +1 -1
  33. package/dist/bidglassBidAdapter.js +1 -1
  34. package/dist/bidwatchAnalyticsAdapter.js +1 -1
  35. package/dist/big-richmediaBidAdapter.js +1 -1
  36. package/dist/bluebillywigBidAdapter.js +1 -1
  37. package/dist/brandmetricsRtdProvider.js +1 -1
  38. package/dist/bridgewellBidAdapter.js +1 -1
  39. package/dist/brightMountainMediaBidAdapter.js +1 -1
  40. package/dist/browsiRtdProvider.js +1 -1
  41. package/dist/cleanioRtdProvider.js +1 -1
  42. package/dist/concertBidAdapter.js +1 -1
  43. package/dist/connectadBidAdapter.js +1 -1
  44. package/dist/consentManagement.js +1 -1
  45. package/dist/consentManagementUsp.js +1 -1
  46. package/dist/consumableBidAdapter.js +1 -1
  47. package/dist/conversantBidAdapter.js +1 -1
  48. package/dist/cpmstarBidAdapter.js +1 -1
  49. package/dist/craftBidAdapter.js +1 -1
  50. package/dist/criteoBidAdapter.js +1 -1
  51. package/dist/currency.js +1 -1
  52. package/dist/datawrkzBidAdapter.js +1 -0
  53. package/dist/debugging-standalone.js +1 -1
  54. package/dist/dfpAdServerVideo.js +1 -1
  55. package/dist/dgkeywordRtdProvider.js +1 -1
  56. package/dist/displayioBidAdapter.js +1 -3
  57. package/dist/dspxBidAdapter.js +1 -1
  58. package/dist/enrichmentFpdModule.js +1 -1
  59. package/dist/eplanningBidAdapter.js +1 -1
  60. package/dist/finativeBidAdapter.js +1 -1
  61. package/dist/glimpseBidAdapter.js +1 -1
  62. package/dist/gmosspBidAdapter.js +1 -1
  63. package/dist/goldbachBidAdapter.js +1 -1
  64. package/dist/gridBidAdapter.js +1 -1
  65. package/dist/gridNMBidAdapter.js +1 -1
  66. package/dist/gumgumBidAdapter.js +1 -1
  67. package/dist/h12mediaBidAdapter.js +1 -1
  68. package/dist/id5IdSystem.js +1 -1
  69. package/dist/imRtdProvider.js +1 -1
  70. package/dist/impactifyBidAdapter.js +1 -1
  71. package/dist/improvedigitalBidAdapter.js +1 -1
  72. package/dist/inmarBidAdapter.js +1 -1
  73. package/dist/insticatorBidAdapter.js +1 -1
  74. package/dist/ixBidAdapter.js +1 -1
  75. package/dist/jixieBidAdapter.js +1 -1
  76. package/dist/justpremiumBidAdapter.js +1 -1
  77. package/dist/kargoBidAdapter.js +1 -1
  78. package/dist/konduitAnalyticsAdapter.js +1 -1
  79. package/dist/kueezBidAdapter.js +1 -1
  80. package/dist/lassoBidAdapter.js +1 -1
  81. package/dist/lifestreetBidAdapter.js +1 -0
  82. package/dist/limelightDigitalBidAdapter.js +1 -1
  83. package/dist/liveyieldAnalyticsAdapter.js +1 -1
  84. package/dist/logicadBidAdapter.js +1 -1
  85. package/dist/loglyliftBidAdapter.js +1 -1
  86. package/dist/mabidderBidAdapter.js +1 -0
  87. package/dist/malltvAnalyticsAdapter.js +1 -1
  88. package/dist/marsmediaBidAdapter.js +1 -1
  89. package/dist/mediafuseBidAdapter.js +1 -1
  90. package/dist/mediagoBidAdapter.js +1 -0
  91. package/dist/mediakeysBidAdapter.js +1 -1
  92. package/dist/mediasquareBidAdapter.js +1 -1
  93. package/dist/mgidBidAdapter.js +1 -1
  94. package/dist/minutemediaBidAdapter.js +1 -1
  95. package/dist/nextMillenniumBidAdapter.js +1 -1
  96. package/dist/not-for-prod/prebid.js +153 -147
  97. package/dist/oguryBidAdapter.js +1 -1
  98. package/dist/oneKeyIdSystem.js +1 -0
  99. package/dist/oneKeyRtdProvider.js +1 -0
  100. package/dist/onetagBidAdapter.js +1 -1
  101. package/dist/ooloAnalyticsAdapter.js +1 -1
  102. package/dist/openxAnalyticsAdapter.js +1 -1
  103. package/dist/outbrainBidAdapter.js +1 -1
  104. package/dist/parrableIdSystem.js +1 -1
  105. package/dist/permutiveRtdProvider.js +1 -1
  106. package/dist/pixfutureBidAdapter.js +1 -1
  107. package/dist/prebid-core.js +2 -2
  108. package/dist/publinkIdSystem.js +1 -1
  109. package/dist/pubmaticAnalyticsAdapter.js +1 -1
  110. package/dist/pubmaticBidAdapter.js +1 -1
  111. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  112. package/dist/pxyzBidAdapter.js +1 -1
  113. package/dist/quantcastBidAdapter.js +1 -1
  114. package/dist/rasBidAdapter.js +1 -1
  115. package/dist/readpeakBidAdapter.js +1 -1
  116. package/dist/relaidoBidAdapter.js +1 -1
  117. package/dist/rhythmoneBidAdapter.js +1 -1
  118. package/dist/riseBidAdapter.js +1 -1
  119. package/dist/rtbhouseBidAdapter.js +1 -1
  120. package/dist/rubiconAnalyticsAdapter.js +1 -1
  121. package/dist/rubiconBidAdapter.js +1 -1
  122. package/dist/seedingAllianceBidAdapter.js +1 -1
  123. package/dist/seedtagBidAdapter.js +1 -1
  124. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  125. package/dist/sharethroughBidAdapter.js +1 -1
  126. package/dist/shinezBidAdapter.js +1 -1
  127. package/dist/smaatoBidAdapter.js +1 -1
  128. package/dist/smartadserverBidAdapter.js +1 -1
  129. package/dist/smartxBidAdapter.js +1 -1
  130. package/dist/smilewantedBidAdapter.js +1 -1
  131. package/dist/sonobiBidAdapter.js +1 -1
  132. package/dist/sovrnAnalyticsAdapter.js +1 -1
  133. package/dist/sovrnBidAdapter.js +1 -1
  134. package/dist/sspBCBidAdapter.js +1 -1
  135. package/dist/sublimeBidAdapter.js +1 -1
  136. package/dist/synacormediaBidAdapter.js +1 -1
  137. package/dist/tappxBidAdapter.js +1 -1
  138. package/dist/targetVideoBidAdapter.js +1 -1
  139. package/dist/teadsBidAdapter.js +1 -1
  140. package/dist/trionBidAdapter.js +1 -1
  141. package/dist/tripleliftBidAdapter.js +1 -1
  142. package/dist/trustpidSystem.js +1 -1
  143. package/dist/ttdBidAdapter.js +1 -1
  144. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  145. package/dist/underdogmediaBidAdapter.js +1 -1
  146. package/dist/undertoneBidAdapter.js +1 -1
  147. package/dist/userId.js +1 -1
  148. package/dist/vidazooBidAdapter.js +1 -1
  149. package/dist/videobyteBidAdapter.js +1 -1
  150. package/dist/viewability.js +1 -1
  151. package/dist/visxBidAdapter.js +1 -1
  152. package/dist/vuukleBidAdapter.js +1 -1
  153. package/dist/widespaceBidAdapter.js +1 -1
  154. package/dist/winrBidAdapter.js +1 -1
  155. package/dist/yahoosspBidAdapter.js +1 -1
  156. package/dist/yieldmoBidAdapter.js +1 -1
  157. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  158. package/dist/zeta_global_sspBidAdapter.js +1 -1
  159. package/integrationExamples/gpt/permutiveRtdProvider_example.html +1 -1
  160. package/karma.conf.maker.js +2 -13
  161. package/modules/.submodules.json +2 -0
  162. package/modules/acuityAdsBidAdapter.js +207 -0
  163. package/modules/acuityAdsBidAdapter.md +79 -0
  164. package/modules/adagioBidAdapter.js +2 -3
  165. package/modules/adgenerationBidAdapter.js +2 -2
  166. package/modules/adkernelBidAdapter.js +28 -12
  167. package/modules/admixerBidAdapter.js +1 -1
  168. package/modules/adnowBidAdapter.js +1 -1
  169. package/modules/adpod.js +1 -1
  170. package/modules/adrelevantisBidAdapter.js +2 -2
  171. package/modules/adriverBidAdapter.js +5 -12
  172. package/modules/adriverIdSystem.js +2 -1
  173. package/modules/adtargetBidAdapter.js +1 -1
  174. package/modules/adtelligentBidAdapter.js +6 -2
  175. package/modules/adtrgtmeBidAdapter.js +333 -0
  176. package/modules/adtrgtmeBidAdapter.md +69 -0
  177. package/modules/adtrueBidAdapter.js +1 -1
  178. package/modules/adxpremiumAnalyticsAdapter.js +1 -1
  179. package/modules/adyoulikeBidAdapter.js +1 -1
  180. package/modules/alkimiBidAdapter.js +2 -1
  181. package/modules/aniviewBidAdapter.js +1 -1
  182. package/modules/appnexusBidAdapter.js +13 -93
  183. package/modules/apstreamBidAdapter.js +2 -2
  184. package/modules/beopBidAdapter.js +4 -4
  185. package/modules/betweenBidAdapter.js +4 -4
  186. package/modules/bidwatchAnalyticsAdapter.js +112 -59
  187. package/modules/bizzclickBidAdapter.js +1 -1
  188. package/modules/brightMountainMediaBidAdapter.js +1 -1
  189. package/modules/browsiRtdProvider.js +24 -10
  190. package/modules/cleanmedianetBidAdapter.js +1 -1
  191. package/modules/consentManagement.js +1 -1
  192. package/modules/consentManagementUsp.js +1 -1
  193. package/modules/consumableBidAdapter.js +43 -3
  194. package/modules/cpmstarBidAdapter.js +23 -13
  195. package/modules/criteoBidAdapter.js +19 -13
  196. package/modules/currency.js +1 -0
  197. package/modules/cwireBidAdapter.js +1 -1
  198. package/modules/datablocksBidAdapter.js +1 -1
  199. package/modules/datawrkzBidAdapter.js +633 -0
  200. package/modules/datawrkzBidAdapter.md +160 -0
  201. package/modules/dfpAdServerVideo.js +2 -2
  202. package/modules/dgkeywordRtdProvider.js +10 -1
  203. package/modules/displayioBidAdapter.js +92 -97
  204. package/modules/dspxBidAdapter.js +1 -1
  205. package/modules/e_volutionBidAdapter.js +3 -3
  206. package/modules/ebdrBidAdapter.js +1 -1
  207. package/modules/emx_digitalBidAdapter.js +1 -1
  208. package/modules/enrichmentFpdModule.js +11 -0
  209. package/modules/fabrickIdSystem.js +2 -2
  210. package/modules/gamoshiBidAdapter.js +1 -1
  211. package/modules/getintentBidAdapter.js +1 -1
  212. package/modules/gjirafaBidAdapter.js +2 -2
  213. package/modules/goldbachBidAdapter.js +8 -8
  214. package/modules/gothamadsBidAdapter.js +2 -2
  215. package/modules/gumgumBidAdapter.js +3 -3
  216. package/modules/h12mediaBidAdapter.js +1 -1
  217. package/modules/id5AnalyticsAdapter.js +1 -1
  218. package/modules/id5IdSystem.js +160 -111
  219. package/modules/id5IdSystem.md +16 -14
  220. package/modules/imRtdProvider.js +20 -7
  221. package/modules/imRtdProvider.md +3 -1
  222. package/modules/impactifyBidAdapter.js +1 -1
  223. package/modules/improvedigitalBidAdapter.js +50 -28
  224. package/modules/inskinBidAdapter.js +1 -1
  225. package/modules/insticatorBidAdapter.js +1 -1
  226. package/modules/integr8BidAdapter.js +2 -2
  227. package/modules/intentIqIdSystem.js +2 -2
  228. package/modules/interactiveOffersBidAdapter.js +1 -1
  229. package/modules/iqmBidAdapter.js +1 -1
  230. package/modules/ixBidAdapter.js +21 -328
  231. package/modules/ixBidAdapter.md +1 -19
  232. package/modules/kargoBidAdapter.js +4 -5
  233. package/modules/krushmediaBidAdapter.js +2 -2
  234. package/modules/lassoBidAdapter.js +3 -3
  235. package/modules/lifestreetBidAdapter.js +143 -0
  236. package/modules/limelightDigitalBidAdapter.js +2 -1
  237. package/modules/livewrappedAnalyticsAdapter.js +3 -3
  238. package/modules/lkqdBidAdapter.js +3 -3
  239. package/modules/loganBidAdapter.js +2 -2
  240. package/modules/luponmediaBidAdapter.js +3 -3
  241. package/modules/mabidderBidAdapter.js +60 -0
  242. package/modules/mabidderBidAdapter.md +31 -0
  243. package/modules/malltvBidAdapter.js +2 -2
  244. package/modules/mediagoBidAdapter.js +462 -0
  245. package/modules/mediagoBidAdapter.md +34 -0
  246. package/modules/mediakeysBidAdapter.js +2 -2
  247. package/modules/mgidBidAdapter.js +2 -2
  248. package/modules/nextMillenniumBidAdapter.js +25 -6
  249. package/modules/nobidBidAdapter.js +2 -2
  250. package/modules/novatiqIdSystem.js +1 -1
  251. package/modules/oneKeyIdSystem.js +78 -0
  252. package/modules/oneKeyIdSystem.md +109 -0
  253. package/modules/oneKeyRtdProvider.js +98 -0
  254. package/modules/oneKeyRtdProvider.md +127 -0
  255. package/modules/open8BidAdapter.js +1 -1
  256. package/modules/openwebBidAdapter.js +1 -1
  257. package/modules/openxAnalyticsAdapter.js +5 -744
  258. package/modules/openxAnalyticsAdapter.md +4 -0
  259. package/modules/openxBidAdapter.js +3 -3
  260. package/modules/permutiveRtdProvider.js +55 -8
  261. package/modules/pixfutureBidAdapter.js +1 -1
  262. package/modules/prebidmanagerAnalyticsAdapter.js +1 -1
  263. package/modules/priceFloors.js +1 -1
  264. package/modules/pubmaticAnalyticsAdapter.js +1 -1
  265. package/modules/pubmaticBidAdapter.js +19 -1
  266. package/modules/pubwiseAnalyticsAdapter.js +1 -1
  267. package/modules/pubwiseBidAdapter.js +3 -3
  268. package/modules/pubxBidAdapter.js +1 -1
  269. package/modules/pubxaiAnalyticsAdapter.js +2 -2
  270. package/modules/quantcastIdSystem.js +1 -1
  271. package/modules/radsBidAdapter.js +1 -1
  272. package/modules/rasBidAdapter.js +8 -0
  273. package/modules/rasBidAdapter.md +14 -13
  274. package/modules/revcontentBidAdapter.js +1 -1
  275. package/modules/richaudienceBidAdapter.js +1 -1
  276. package/modules/rtbhouseBidAdapter.js +25 -1
  277. package/modules/schain.js +1 -1
  278. package/modules/seedtagBidAdapter.md +25 -56
  279. package/modules/showheroes-bsBidAdapter.js +1 -1
  280. package/modules/sizeMappingV2.js +1 -1
  281. package/modules/smaatoBidAdapter.js +2 -2
  282. package/modules/sonobiAnalyticsAdapter.js +1 -1
  283. package/modules/sonobiBidAdapter.js +4 -3
  284. package/modules/staqAnalyticsAdapter.js +1 -1
  285. package/modules/tappxBidAdapter.js +11 -2
  286. package/modules/targetVideoBidAdapter.js +1 -1
  287. package/modules/theAdxBidAdapter.js +2 -2
  288. package/modules/tpmnBidAdapter.js +1 -1
  289. package/modules/trionBidAdapter.js +2 -2
  290. package/modules/tripleliftBidAdapter.js +20 -1
  291. package/modules/trustpidSystem.js +6 -42
  292. package/modules/trustpidSystem.md +10 -10
  293. package/modules/underdogmediaBidAdapter.js +1 -1
  294. package/modules/userId/eids.js +26 -0
  295. package/modules/userId/userId.md +2 -2
  296. package/modules/vdoaiBidAdapter.js +1 -1
  297. package/modules/vidazooBidAdapter.js +7 -5
  298. package/modules/vidoomyBidAdapter.js +1 -1
  299. package/modules/viewability.js +14 -14
  300. package/modules/winrBidAdapter.js +1 -1
  301. package/modules/yahoosspBidAdapter.js +3 -3
  302. package/modules/yandexBidAdapter.js +1 -1
  303. package/modules/yieldmoBidAdapter.js +3 -3
  304. package/modules/yieldoneBidAdapter.js +2 -2
  305. package/modules/zeta_global_sspBidAdapter.js +24 -21
  306. package/package.json +3 -3
  307. package/src/Renderer.js +1 -1
  308. package/src/adloader.js +2 -1
  309. package/src/adserver.js +0 -56
  310. package/src/auction.js +60 -16
  311. package/src/bidfactory.js +1 -1
  312. package/src/native.js +75 -60
  313. package/src/refererDetection.js +12 -1
  314. package/src/sizeMapping.js +5 -7
  315. package/src/targeting.js +1 -1
  316. package/src/userSync.js +1 -1
  317. package/src/utils/promise.js +3 -1
  318. package/src/utils.js +27 -0
  319. package/src/video.js +5 -4
  320. package/src/videoCache.js +8 -2
  321. package/test/pages/instream.html +2 -2
  322. package/test/spec/modules/acuityAdsBidAdapter_spec.js +398 -0
  323. package/test/spec/modules/adagioBidAdapter_spec.js +2 -0
  324. package/test/spec/modules/adkernelBidAdapter_spec.js +11 -2
  325. package/test/spec/modules/adriverBidAdapter_spec.js +6 -13
  326. package/test/spec/modules/adriverIdSystem_spec.js +3 -8
  327. package/test/spec/modules/adtelligentBidAdapter_spec.js +2 -0
  328. package/test/spec/modules/adtrgtmeBidAdapter_spec.js +802 -0
  329. package/test/spec/modules/alkimiBidAdapter_spec.js +2 -1
  330. package/test/spec/modules/appnexusBidAdapter_spec.js +1 -0
  331. package/test/spec/modules/beopBidAdapter_spec.js +11 -0
  332. package/test/spec/modules/betweenBidAdapter_spec.js +17 -0
  333. package/test/spec/modules/bidwatchAnalyticsAdapter_spec.js +28 -12
  334. package/test/spec/modules/big-richmediaBidAdapter_spec.js +1 -0
  335. package/test/spec/modules/browsiRtdProvider_spec.js +40 -1
  336. package/test/spec/modules/consumableBidAdapter_spec.js +158 -0
  337. package/test/spec/modules/cpmstarBidAdapter_spec.js +1 -1
  338. package/test/spec/modules/criteoBidAdapter_spec.js +35 -26
  339. package/test/spec/modules/currency_spec.js +22 -0
  340. package/test/spec/modules/datawrkzBidAdapter_spec.js +656 -0
  341. package/test/spec/modules/dgkeywordRtdProvider_spec.js +1 -1
  342. package/test/spec/modules/displayioBidAdapter_spec.js +16 -52
  343. package/test/spec/modules/enrichmentFpdModule_spec.js +16 -1
  344. package/test/spec/modules/fpdModule_spec.js +2 -1
  345. package/test/spec/modules/id5IdSystem_spec.js +529 -172
  346. package/test/spec/modules/imRtdProvider_spec.js +10 -5
  347. package/test/spec/modules/improvedigitalBidAdapter_spec.js +9 -13
  348. package/test/spec/modules/ixBidAdapter_spec.js +216 -123
  349. package/test/spec/modules/kargoBidAdapter_spec.js +11 -2
  350. package/test/spec/modules/lifestreetBidAdapter_spec.js +232 -0
  351. package/test/spec/modules/limelightDigitalBidAdapter_spec.js +59 -7
  352. package/test/spec/modules/mabidderBidAdapter_spec.js +125 -0
  353. package/test/spec/modules/mediagoBidAdapter_spec.js +97 -0
  354. package/test/spec/modules/nextMillenniumBidAdapter_spec.js +2 -7
  355. package/test/spec/modules/oneKeyIdSystem_spec.js +107 -0
  356. package/test/spec/modules/oneKeyRtdProvider_spec.js +152 -0
  357. package/test/spec/modules/openxAnalyticsAdapter_spec.js +6 -638
  358. package/test/spec/modules/permutiveRtdProvider_spec.js +152 -2
  359. package/test/spec/modules/pubmaticBidAdapter_spec.js +69 -4
  360. package/test/spec/modules/rasBidAdapter_spec.js +2 -0
  361. package/test/spec/modules/tripleliftBidAdapter_spec.js +18 -0
  362. package/test/spec/modules/trustpidSystem_spec.js +27 -45
  363. package/test/spec/modules/vidazooBidAdapter_spec.js +36 -23
  364. package/test/spec/modules/zeta_global_sspBidAdapter_spec.js +59 -0
  365. package/test/spec/native_spec.js +257 -2
  366. package/test/spec/videoCache_spec.js +37 -7
@@ -5,9 +5,11 @@ import {
5
5
  initSegments,
6
6
  isAcEnabled,
7
7
  isPermutiveOnPage,
8
- setBidderRtb
8
+ setBidderRtb,
9
+ getModuleConfig,
10
+ PERMUTIVE_SUBMODULE_CONFIG_KEY,
9
11
  } from 'modules/permutiveRtdProvider.js'
10
- import { deepAccess } from '../../../src/utils.js'
12
+ import { deepAccess, deepSetValue, mergeDeep } from '../../../src/utils.js'
11
13
  import { config } from 'src/config.js'
12
14
 
13
15
  describe('permutiveRtdProvider', function () {
@@ -29,6 +31,154 @@ describe('permutiveRtdProvider', function () {
29
31
  })
30
32
  })
31
33
 
34
+ describe('getModuleConfig', function () {
35
+ beforeEach(function () {
36
+ // Reads data from the cache
37
+ permutiveSubmodule.init()
38
+ })
39
+
40
+ const liftToParams = (params) => ({ params })
41
+
42
+ const getDefaultConfig = () => ({
43
+ waitForIt: false,
44
+ params: {
45
+ maxSegs: 500,
46
+ acBidders: [],
47
+ overwrites: {},
48
+ },
49
+ })
50
+
51
+ const storeConfigInCacheAndInit = (data) => {
52
+ const dataToStore = { [PERMUTIVE_SUBMODULE_CONFIG_KEY]: data }
53
+ setLocalStorage(dataToStore)
54
+ // Reads data from the cache
55
+ permutiveSubmodule.init()
56
+
57
+ // Cleanup
58
+ return () => removeLocalStorage(dataToStore)
59
+ }
60
+
61
+ const setWindowPermutivePrebid = (getPermutiveRtdConfig) => {
62
+ // Read from Permutive
63
+ const backup = window.permutive
64
+
65
+ deepSetValue(window, 'permutive.addons.prebid', {
66
+ getPermutiveRtdConfig,
67
+ })
68
+
69
+ // Cleanup
70
+ return () => window.permutive = backup
71
+ }
72
+
73
+ it('should return default values', function () {
74
+ const config = getModuleConfig({})
75
+ expect(config).to.deep.equal(getDefaultConfig())
76
+ })
77
+
78
+ it('should override deeply on custom config', function () {
79
+ const defaultConfig = getDefaultConfig()
80
+
81
+ const customModuleConfig = { waitForIt: true, params: { acBidders: ['123'] } }
82
+ const config = getModuleConfig(customModuleConfig)
83
+
84
+ expect(config).to.deep.equal(mergeDeep(defaultConfig, customModuleConfig))
85
+ })
86
+
87
+ it('should override deeply on cached config', function () {
88
+ const defaultConfig = getDefaultConfig()
89
+
90
+ const cachedParamsConfig = { acBidders: ['123'] }
91
+ const cleanupCache = storeConfigInCacheAndInit(cachedParamsConfig)
92
+
93
+ const config = getModuleConfig({})
94
+
95
+ expect(config).to.deep.equal(mergeDeep(defaultConfig, liftToParams(cachedParamsConfig)))
96
+
97
+ // Cleanup
98
+ cleanupCache()
99
+ })
100
+
101
+ it('should override deeply on Permutive Rtd config', function () {
102
+ const defaultConfig = getDefaultConfig()
103
+
104
+ const permutiveRtdConfigParams = { acBidders: ['123'], overwrites: { '123': true } }
105
+ const cleanupPermutive = setWindowPermutivePrebid(function () {
106
+ return permutiveRtdConfigParams
107
+ })
108
+
109
+ const config = getModuleConfig({})
110
+
111
+ expect(config).to.deep.equal(mergeDeep(defaultConfig, liftToParams(permutiveRtdConfigParams)))
112
+
113
+ // Cleanup
114
+ cleanupPermutive()
115
+ })
116
+
117
+ it('should NOT use cached Permutive Rtd config if window.permutive is available', function () {
118
+ const defaultConfig = getDefaultConfig()
119
+
120
+ // As Permutive is available on the window object, this value won't be used.
121
+ const cachedParamsConfig = { acBidders: ['123'] }
122
+ const cleanupCache = storeConfigInCacheAndInit(cachedParamsConfig)
123
+
124
+ const permutiveRtdConfigParams = { acBidders: ['456'], overwrites: { '123': true } }
125
+ const cleanupPermutive = setWindowPermutivePrebid(function () {
126
+ return permutiveRtdConfigParams
127
+ })
128
+
129
+ const config = getModuleConfig({})
130
+
131
+ expect(config).to.deep.equal(mergeDeep(defaultConfig, liftToParams(permutiveRtdConfigParams)))
132
+
133
+ // Cleanup
134
+ cleanupCache()
135
+ cleanupPermutive()
136
+ })
137
+
138
+ it('should handle calling Permutive method throwing error', function () {
139
+ const defaultConfig = getDefaultConfig()
140
+
141
+ const cleanupPermutive = setWindowPermutivePrebid(function () {
142
+ throw new Error()
143
+ })
144
+
145
+ const config = getModuleConfig({})
146
+
147
+ expect(config).to.deep.equal(defaultConfig)
148
+
149
+ // Cleanup
150
+ cleanupPermutive()
151
+ })
152
+
153
+ it('should override deeply in priority order', function () {
154
+ const defaultConfig = getDefaultConfig()
155
+
156
+ // As Permutive is available on the window object, this value won't be used.
157
+ const cachedConfig = { acBidders: ['123'] }
158
+ const cleanupCache = storeConfigInCacheAndInit(cachedConfig)
159
+
160
+ // Read from Permutive
161
+ const permutiveRtdConfig = { acBidders: ['456'] }
162
+ const cleanupPermutive = setWindowPermutivePrebid(function () {
163
+ return permutiveRtdConfig
164
+ })
165
+
166
+ const customModuleConfig = { params: { acBidders: ['789'], maxSegs: 499 } }
167
+ const config = getModuleConfig(customModuleConfig)
168
+
169
+ // The configs are in reverse priority order as configs are merged left to right. So the priority is,
170
+ // 1. customModuleConfig <- set by publisher with pbjs.setConfig
171
+ // 2. permutiveRtdConfig <- set by the publisher using Permutive.
172
+ // 3. defaultConfig
173
+ const configMergedInPriorityOrder = mergeDeep(defaultConfig, liftToParams(permutiveRtdConfig), customModuleConfig)
174
+ expect(config).to.deep.equal(configMergedInPriorityOrder)
175
+
176
+ // Cleanup
177
+ cleanupCache()
178
+ cleanupPermutive()
179
+ })
180
+ })
181
+
32
182
  describe('ortb2 config', function () {
33
183
  beforeEach(function () {
34
184
  config.resetConfig()
@@ -1,5 +1,5 @@
1
1
  import {expect} from 'chai';
2
- import {spec, checkVideoPlacement} from 'modules/pubmaticBidAdapter.js';
2
+ import {spec, checkVideoPlacement, _getDomainFromURL} from 'modules/pubmaticBidAdapter.js';
3
3
  import * as utils from 'src/utils.js';
4
4
  import {config} from 'src/config.js';
5
5
  import { createEidsArray } from 'modules/userId/eids.js';
@@ -1103,8 +1103,24 @@ describe('PubMatic adapter', function () {
1103
1103
  expect(data.imp[0].ext.key_val).to.exist.and.to.equal(bidRequests[0].params.dctr);
1104
1104
  expect(data.imp[0].bidfloorcur).to.equal(bidRequests[0].params.currency);
1105
1105
  expect(data.source.ext.schain).to.deep.equal(bidRequests[0].schain);
1106
+ expect(data.ext.epoch).to.exist;
1106
1107
  });
1107
1108
 
1109
+ it('Set tmax from global config if not set by requestBids method', function() {
1110
+ let sandbox = sinon.sandbox.create();
1111
+ sandbox.stub(config, 'getConfig').callsFake((key) => {
1112
+ var config = {
1113
+ bidderTimeout: 3000
1114
+ };
1115
+ return config[key];
1116
+ });
1117
+ let request = spec.buildRequests(bidRequests, {
1118
+ auctionId: 'new-auction-id', timeout: 3000
1119
+ });
1120
+ let data = JSON.parse(request.data);
1121
+ expect(data.tmax).to.deep.equal(3000);
1122
+ sandbox.restore();
1123
+ });
1108
1124
  describe('Marketplace parameters', function() {
1109
1125
  let bidderSettingStub;
1110
1126
  beforeEach(function() {
@@ -1688,17 +1704,66 @@ describe('PubMatic adapter', function () {
1688
1704
  describe('FPD', function() {
1689
1705
  let newRequest;
1690
1706
 
1691
- it('ortb2.site should be merged in the request', function() {
1707
+ describe('ortb2.site should not override page, domain & ref values', function() {
1708
+ it('When above properties are present in ortb2.site', function() {
1709
+ const ortb2 = {
1710
+ site: {
1711
+ domain: 'page.example.com',
1712
+ page: 'https://page.example.com/here.html',
1713
+ ref: 'https://page.example.com/here.html'
1714
+ }
1715
+ };
1716
+ const request = spec.buildRequests(bidRequests, {ortb2});
1717
+ let data = JSON.parse(request.data);
1718
+ expect(data.site.domain).not.equal('page.example.com');
1719
+ expect(data.site.page).not.equal('https://page.example.com/here.html');
1720
+ expect(data.site.ref).not.equal('https://page.example.com/here.html');
1721
+ });
1722
+
1723
+ it('When above properties are absent in ortb2.site', function () {
1724
+ const ortb2 = {
1725
+ site: {}
1726
+ };
1727
+ let request = spec.buildRequests(bidRequests, {
1728
+ auctionId: 'new-auction-id',
1729
+ ortb2
1730
+ });
1731
+ let data = JSON.parse(request.data);
1732
+ let response = spec.interpretResponse(bidResponses, request);
1733
+ expect(data.site.page).to.equal(bidRequests[0].params.kadpageurl);
1734
+ expect(data.site.domain).to.equal(_getDomainFromURL(data.site.page));
1735
+ expect(response[0].referrer).to.equal(data.site.ref);
1736
+ });
1737
+
1738
+ it('With some extra properties in ortb2.site', function() {
1739
+ const ortb2 = {
1740
+ site: {
1741
+ domain: 'page.example.com',
1742
+ page: 'https://page.example.com/here.html',
1743
+ ref: 'https://page.example.com/here.html',
1744
+ cat: ['IAB2'],
1745
+ sectioncat: ['IAB2-2']
1746
+ }
1747
+ };
1748
+ const request = spec.buildRequests(bidRequests, {ortb2});
1749
+ let data = JSON.parse(request.data);
1750
+ expect(data.site.domain).not.equal('page.example.com');
1751
+ expect(data.site.page).not.equal('https://page.example.com/here.html');
1752
+ expect(data.site.ref).not.equal('https://page.example.com/here.html');
1753
+ expect(data.site.cat).to.deep.equal(['IAB2']);
1754
+ expect(data.site.sectioncat).to.deep.equal(['IAB2-2']);
1755
+ });
1756
+ });
1757
+
1758
+ it('ortb2.site should be merged except page, domain & ref in the request', function() {
1692
1759
  const ortb2 = {
1693
1760
  site: {
1694
- domain: 'page.example.com',
1695
1761
  cat: ['IAB2'],
1696
1762
  sectioncat: ['IAB2-2']
1697
1763
  }
1698
1764
  };
1699
1765
  const request = spec.buildRequests(bidRequests, {ortb2});
1700
1766
  let data = JSON.parse(request.data);
1701
- expect(data.site.domain).to.equal('page.example.com');
1702
1767
  expect(data.site.cat).to.deep.equal(['IAB2']);
1703
1768
  expect(data.site.sectioncat).to.deep.equal(['IAB2-2']);
1704
1769
  });
@@ -58,6 +58,7 @@ describe('rasBidAdapter', function () {
58
58
  slot: 'test',
59
59
  area: 'areatest',
60
60
  site: 'test',
61
+ slotSequence: '0',
61
62
  network: '4178463'
62
63
  }
63
64
  };
@@ -140,6 +141,7 @@ describe('rasBidAdapter', function () {
140
141
  expect(requests[0].url).to.have.string('DV=test%2Fareatest');
141
142
  expect(requests[0].url).to.have.string('kwrd=val1%2Bval2');
142
143
  expect(requests[0].url).to.have.string('kvadunit=test%2Fareatest');
144
+ expect(requests[0].url).to.have.string('pos0=0');
143
145
  });
144
146
  });
145
147
 
@@ -714,6 +714,24 @@ describe('triplelift adapter', function () {
714
714
  expect(payload.user).to.deep.equal({ext: {eids: [{source: 'criteo.com', uids: [{id, ext: {rtiPartner: 'criteoId'}}]}]}});
715
715
  });
716
716
 
717
+ it('should add adqueryId to the payload if included', function () {
718
+ const id = '%7B%22qid%22%3A%229c985f8cc31d9b3c000d%22%7D';
719
+ bidRequests[0].userIdAsEids = [{ source: 'adquery.io', uids: [{ id }] }];
720
+ const request = tripleliftAdapterSpec.buildRequests(bidRequests, bidderRequest);
721
+ const payload = request.data;
722
+ expect(payload).to.exist;
723
+ expect(payload.user).to.deep.equal({ext: {eids: [{source: 'adquery.io', uids: [{id, ext: {rtiPartner: 'adquery.io'}}]}]}});
724
+ });
725
+
726
+ it('should add amxRtbId to the payload if included', function () {
727
+ const id = 'Ok9JQkBM-UFlAXEZQ-UUNBQlZOQzgrUFhW-UUNBQkRQTUBPQVpVWVxNXlZUUF9AUFhAUF9PXFY/';
728
+ bidRequests[0].userIdAsEids = [{ source: 'amxrtb.com', uids: [{ id }] }];
729
+ const request = tripleliftAdapterSpec.buildRequests(bidRequests, bidderRequest);
730
+ const payload = request.data;
731
+ expect(payload).to.exist;
732
+ expect(payload.user).to.deep.equal({ext: {eids: [{source: 'amxrtb.com', uids: [{id, ext: {rtiPartner: 'amxrtb.com'}}]}]}});
733
+ });
734
+
717
735
  it('should add tdid, idl_env and criteoId to the payload if both are included', function () {
718
736
  const tdidId = '6bca7f6b-a98a-46c0-be05-6020f7604598';
719
737
  const idlEnvId = 'XY6104gr0njcH9UDIR7ysFFJcm2XNpqeJTYslleJ_cMlsFOfZI';
@@ -22,14 +22,6 @@ describe('trustpid System', () => {
22
22
  });
23
23
 
24
24
  describe('trustpid getId()', () => {
25
- before(() => {
26
- window.FC_CONF = {
27
- TELCO_ACRONYM: {
28
- 'domain.with.acronym': 'acronymValue',
29
- }
30
- };
31
- });
32
-
33
25
  afterEach(() => {
34
26
  storage.removeDataFromLocalStorage(connectDataKey);
35
27
  storage.removeDataFromLocalStorage(connectDomainKey);
@@ -52,7 +44,7 @@ describe('trustpid System', () => {
52
44
  it('tests if localstorage & JSON works properly ', () => {
53
45
  const idGraph = {
54
46
  'domain': 'domainValue',
55
- 'umid': 'umidValue',
47
+ 'atid': 'atidValue',
56
48
  };
57
49
  storage.setDataInLocalStorage(connectDataKey, JSON.stringify(getStorageData(idGraph)));
58
50
  expect(JSON.parse(storage.getDataFromLocalStorage(connectDataKey))).to.have.property('connectId');
@@ -61,7 +53,7 @@ describe('trustpid System', () => {
61
53
  it('returns {callback: func} if domains don\'t match', () => {
62
54
  const idGraph = {
63
55
  'domain': 'domainValue',
64
- 'umid': 'umidValue',
56
+ 'atid': 'atidValue',
65
57
  };
66
58
  storage.setDataInLocalStorage(connectDomainKey, JSON.stringify('differentDomainValue'));
67
59
  storage.setDataInLocalStorage(connectDataKey, JSON.stringify(getStorageData(idGraph)));
@@ -70,33 +62,33 @@ describe('trustpid System', () => {
70
62
 
71
63
  it('returns {id: {trustpid: data.trustpid}} if we have the right data stored in the localstorage ', () => {
72
64
  const idGraph = {
73
- 'domain': 'domain.with.acronym',
74
- 'umid': 'umidValue',
65
+ 'domain': 'test.domain',
66
+ 'atid': 'atidValue',
75
67
  };
76
- storage.setDataInLocalStorage(connectDomainKey, JSON.stringify('domain.with.acronym'));
68
+ storage.setDataInLocalStorage(connectDomainKey, JSON.stringify('test.domain'));
77
69
  storage.setDataInLocalStorage(connectDataKey, JSON.stringify(getStorageData(idGraph)));
78
70
  const response = trustpidSubmodule.getId();
79
71
  expect(response).to.have.property('id');
80
72
  expect(response.id).to.have.property('trustpid');
81
- expect(response.id.trustpid).to.be.equal('umidValue-acronymValue');
73
+ expect(response.id.trustpid).to.be.equal('atidValue');
82
74
  });
83
75
 
84
76
  it('returns {trustpid: data.trustpid} if we have the right data stored in the localstorage right after the callback is called', (done) => {
85
77
  const idGraph = {
86
- 'domain': 'domain.with.acronym',
87
- 'umid': 'umidValue',
78
+ 'domain': 'test.domain',
79
+ 'atid': 'atidValue',
88
80
  };
89
81
  const response = trustpidSubmodule.getId();
90
82
  expect(response).to.have.property('callback');
91
83
  expect(response.callback.toString()).contain('result(callback)');
92
84
 
93
85
  if (typeof response.callback === 'function') {
94
- storage.setDataInLocalStorage(connectDomainKey, JSON.stringify('domain.with.acronym'));
86
+ storage.setDataInLocalStorage(connectDomainKey, JSON.stringify('test.domain'));
95
87
  storage.setDataInLocalStorage(connectDataKey, JSON.stringify(getStorageData(idGraph)));
96
88
  response.callback(function (result) {
97
89
  expect(result).to.not.be.null;
98
90
  expect(result).to.have.property('trustpid');
99
- expect(result.trustpid).to.be.equal('umidValue-acronymValue');
91
+ expect(result.trustpid).to.be.equal('atidValue');
100
92
  done()
101
93
  })
102
94
  }
@@ -104,8 +96,8 @@ describe('trustpid System', () => {
104
96
 
105
97
  it('returns null if domains don\'t match', (done) => {
106
98
  const idGraph = {
107
- 'domain': 'domain.with.acronym',
108
- 'umid': 'umidValue',
99
+ 'domain': 'test.domain',
100
+ 'atid': 'atidValue',
109
101
  };
110
102
  storage.setDataInLocalStorage(connectDomainKey, JSON.stringify('differentDomainValue'));
111
103
  storage.setDataInLocalStorage(connectDataKey, JSON.stringify(getStorageData(idGraph)));
@@ -127,8 +119,8 @@ describe('trustpid System', () => {
127
119
 
128
120
  it('returns {trustpid: data.trustpid} if we have the right data stored in the localstorage right after 500ms delay', (done) => {
129
121
  const idGraph = {
130
- 'domain': 'domain.with.acronym',
131
- 'umid': 'umidValue',
122
+ 'domain': 'test.domain',
123
+ 'atid': 'atidValue',
132
124
  };
133
125
 
134
126
  const response = trustpidSubmodule.getId();
@@ -137,13 +129,13 @@ describe('trustpid System', () => {
137
129
 
138
130
  if (typeof response.callback === 'function') {
139
131
  setTimeout(() => {
140
- storage.setDataInLocalStorage(connectDomainKey, JSON.stringify('domain.with.acronym'));
132
+ storage.setDataInLocalStorage(connectDomainKey, JSON.stringify('test.domain'));
141
133
  storage.setDataInLocalStorage(connectDataKey, JSON.stringify(getStorageData(idGraph)));
142
134
  }, 500);
143
135
  response.callback(function (result) {
144
136
  expect(result).to.not.be.null;
145
137
  expect(result).to.have.property('trustpid');
146
- expect(result.trustpid).to.be.equal('umidValue-acronymValue');
138
+ expect(result.trustpid).to.be.equal('atidValue');
147
139
  done()
148
140
  })
149
141
  }
@@ -151,8 +143,8 @@ describe('trustpid System', () => {
151
143
 
152
144
  it('returns null if we have the data stored in the localstorage after 500ms delay and the max (waiting) delay is only 200ms ', (done) => {
153
145
  const idGraph = {
154
- 'domain': 'domain.with.acronym',
155
- 'umid': 'umidValue',
146
+ 'domain': 'test.domain',
147
+ 'atid': 'atidValue',
156
148
  };
157
149
 
158
150
  const response = trustpidSubmodule.getId({params: {maxDelayTime: 200}});
@@ -161,7 +153,7 @@ describe('trustpid System', () => {
161
153
 
162
154
  if (typeof response.callback === 'function') {
163
155
  setTimeout(() => {
164
- storage.setDataInLocalStorage(connectDomainKey, JSON.stringify('domain.with.acronym'));
156
+ storage.setDataInLocalStorage(connectDomainKey, JSON.stringify('test.domain'));
165
157
  storage.setDataInLocalStorage(connectDataKey, JSON.stringify(getStorageData(idGraph)));
166
158
  }, 500);
167
159
  response.callback(function (result) {
@@ -202,17 +194,7 @@ describe('trustpid System', () => {
202
194
  });
203
195
  });
204
196
 
205
- describe('trustpid messageHandler for acronyms', () => {
206
- before(() => {
207
- window.FC_CONF = {
208
- TELCO_ACRONYM: {
209
- 'domain1': 'abcd',
210
- 'domain2': 'efgh',
211
- 'domain3': 'ijkl',
212
- }
213
- };
214
- });
215
-
197
+ describe('trustpid messageHandler', () => {
216
198
  afterEach(() => {
217
199
  storage.removeDataFromLocalStorage(connectDataKey);
218
200
  storage.removeDataFromLocalStorage(connectDomainKey);
@@ -223,16 +205,16 @@ describe('trustpid System', () => {
223
205
  })
224
206
 
225
207
  const domains = [
226
- {domain: 'domain1', acronym: 'abcd'},
227
- {domain: 'domain2', acronym: 'efgh'},
228
- {domain: 'domain3', acronym: 'ijkl'},
208
+ 'domain1',
209
+ 'domain2',
210
+ 'domain3',
229
211
  ];
230
212
 
231
- domains.forEach(({domain, acronym}) => {
232
- it(`correctly sets trustpid value and acronym to ${acronym} for ${domain}`, (done) => {
213
+ domains.forEach(domain => {
214
+ it(`correctly sets trustpid value for domain name ${domain}`, (done) => {
233
215
  const idGraph = {
234
216
  'domain': domain,
235
- 'umid': 'umidValue',
217
+ 'atid': 'atidValue',
236
218
  };
237
219
 
238
220
  storage.setDataInLocalStorage(connectDomainKey, JSON.stringify(domain));
@@ -247,7 +229,7 @@ describe('trustpid System', () => {
247
229
  const response = trustpidSubmodule.getId();
248
230
  expect(response).to.have.property('id');
249
231
  expect(response.id).to.have.property('trustpid');
250
- expect(response.id.trustpid).to.be.equal(`umidValue-${acronym}`);
232
+ expect(response.id.trustpid).to.be.equal('atidValue');
251
233
  done();
252
234
  });
253
235
  });
@@ -1,4 +1,4 @@
1
- import { expect } from 'chai';
1
+ import {expect} from 'chai';
2
2
  import {
3
3
  spec as adapter,
4
4
  SUPPORTED_ID_SYSTEMS,
@@ -15,8 +15,8 @@ import {
15
15
  getVidazooSessionId,
16
16
  } from 'modules/vidazooBidAdapter.js';
17
17
  import * as utils from 'src/utils.js';
18
- import { version } from 'package.json';
19
- import { useFakeTimers } from 'sinon';
18
+ import {version} from 'package.json';
19
+ import {useFakeTimers} from 'sinon';
20
20
 
21
21
  const SUB_DOMAIN = 'openrtb';
22
22
 
@@ -55,6 +55,7 @@ const BIDDER_REQUEST = {
55
55
 
56
56
  const SERVER_RESPONSE = {
57
57
  body: {
58
+ cid: 'testcid123',
58
59
  results: [{
59
60
  'ad': '<iframe>console.log("hello world")</iframe>',
60
61
  'price': 0.8,
@@ -84,7 +85,7 @@ const REQUEST = {
84
85
 
85
86
  function getTopWindowQueryParams() {
86
87
  try {
87
- const parsedUrl = utils.parseUrl(window.top.document.URL, { decodeSearchAsString: true });
88
+ const parsedUrl = utils.parseUrl(window.top.document.URL, {decodeSearchAsString: true});
88
89
  return parsedUrl.search;
89
90
  } catch (e) {
90
91
  return '';
@@ -196,19 +197,27 @@ describe('VidazooBidAdapter', function () {
196
197
  });
197
198
  describe('getUserSyncs', function () {
198
199
  it('should have valid user sync with iframeEnabled', function () {
199
- const result = adapter.getUserSyncs({ iframeEnabled: true }, [SERVER_RESPONSE]);
200
+ const result = adapter.getUserSyncs({iframeEnabled: true}, [SERVER_RESPONSE]);
200
201
 
201
202
  expect(result).to.deep.equal([{
202
203
  type: 'iframe',
203
- url: 'https://prebid.cootlogix.com/api/sync/iframe/?gdpr=0&gdpr_consent=&us_privacy='
204
+ url: 'https://sync.cootlogix.com/api/sync/iframe/?cid=testcid123&gdpr=0&gdpr_consent=&us_privacy='
205
+ }]);
206
+ });
207
+
208
+ it('should have valid user sync with cid on response', function () {
209
+ const result = adapter.getUserSyncs({iframeEnabled: true}, [SERVER_RESPONSE]);
210
+ expect(result).to.deep.equal([{
211
+ type: 'iframe',
212
+ url: 'https://sync.cootlogix.com/api/sync/iframe/?cid=testcid123&gdpr=0&gdpr_consent=&us_privacy='
204
213
  }]);
205
214
  });
206
215
 
207
216
  it('should have valid user sync with pixelEnabled', function () {
208
- const result = adapter.getUserSyncs({ pixelEnabled: true }, [SERVER_RESPONSE]);
217
+ const result = adapter.getUserSyncs({pixelEnabled: true}, [SERVER_RESPONSE]);
209
218
 
210
219
  expect(result).to.deep.equal([{
211
- 'url': 'https://prebid.cootlogix.com/api/sync/image/?gdpr=0&gdpr_consent=&us_privacy=',
220
+ 'url': 'https://sync.cootlogix.com/api/sync/image/?cid=testcid123&gdpr=0&gdpr_consent=&us_privacy=',
212
221
  'type': 'image'
213
222
  }]);
214
223
  })
@@ -221,12 +230,12 @@ describe('VidazooBidAdapter', function () {
221
230
  });
222
231
 
223
232
  it('should return empty array when there is no ad', function () {
224
- const responses = adapter.interpretResponse({ price: 1, ad: '' });
233
+ const responses = adapter.interpretResponse({price: 1, ad: ''});
225
234
  expect(responses).to.be.empty;
226
235
  });
227
236
 
228
237
  it('should return empty array when there is no price', function () {
229
- const responses = adapter.interpretResponse({ price: null, ad: 'great ad' });
238
+ const responses = adapter.interpretResponse({price: null, ad: 'great ad'});
230
239
  expect(responses).to.be.empty;
231
240
  });
232
241
 
@@ -265,10 +274,14 @@ describe('VidazooBidAdapter', function () {
265
274
 
266
275
  const userId = (function () {
267
276
  switch (idSystemProvider) {
268
- case 'lipb': return { lipbid: id };
269
- case 'parrableId': return { eid: id };
270
- case 'id5id': return { uid: id };
271
- default: return id;
277
+ case 'lipb':
278
+ return {lipbid: id};
279
+ case 'parrableId':
280
+ return {eid: id};
281
+ case 'id5id':
282
+ return {uid: id};
283
+ default:
284
+ return id;
272
285
  }
273
286
  })();
274
287
 
@@ -285,18 +298,18 @@ describe('VidazooBidAdapter', function () {
285
298
 
286
299
  describe('alternate param names extractors', function () {
287
300
  it('should return undefined when param not supported', function () {
288
- const cid = extractCID({ 'c_id': '1' });
289
- const pid = extractPID({ 'p_id': '1' });
290
- const subDomain = extractSubDomain({ 'sub_domain': 'prebid' });
301
+ const cid = extractCID({'c_id': '1'});
302
+ const pid = extractPID({'p_id': '1'});
303
+ const subDomain = extractSubDomain({'sub_domain': 'prebid'});
291
304
  expect(cid).to.be.undefined;
292
305
  expect(pid).to.be.undefined;
293
306
  expect(subDomain).to.be.undefined;
294
307
  });
295
308
 
296
309
  it('should return value when param supported', function () {
297
- const cid = extractCID({ 'cID': '1' });
298
- const pid = extractPID({ 'Pid': '2' });
299
- const subDomain = extractSubDomain({ 'subDOMAIN': 'prebid' });
310
+ const cid = extractCID({'cID': '1'});
311
+ const pid = extractPID({'Pid': '2'});
312
+ const subDomain = extractSubDomain({'subDOMAIN': 'prebid'});
300
313
  expect(cid).to.be.equal('1');
301
314
  expect(pid).to.be.equal('2');
302
315
  expect(subDomain).to.be.equal('prebid');
@@ -409,7 +422,7 @@ describe('VidazooBidAdapter', function () {
409
422
  now
410
423
  });
411
424
  setStorageItem('myKey', 2020);
412
- const { value, created } = getStorageItem('myKey');
425
+ const {value, created} = getStorageItem('myKey');
413
426
  expect(created).to.be.equal(now);
414
427
  expect(value).to.be.equal(2020);
415
428
  expect(typeof value).to.be.equal('number');
@@ -425,8 +438,8 @@ describe('VidazooBidAdapter', function () {
425
438
  });
426
439
 
427
440
  it('should parse JSON value', function () {
428
- const data = JSON.stringify({ event: 'send' });
429
- const { event } = tryParseJSON(data);
441
+ const data = JSON.stringify({event: 'send'});
442
+ const {event} = tryParseJSON(data);
430
443
  expect(event).to.be.equal('send');
431
444
  });
432
445