prebid.js 9.3.0 → 9.4.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 (219) hide show
  1. package/creative/constants.js +2 -1
  2. package/creative/crossDomain.js +16 -4
  3. package/dist/33acrossAnalyticsAdapter.js +1 -1
  4. package/dist/33acrossBidAdapter.js +1 -1
  5. package/dist/33acrossIdSystem.js +1 -1
  6. package/dist/BTBidAdapter.js +1 -1
  7. package/dist/adagioAnalyticsAdapter.js +1 -1
  8. package/dist/adagioBidAdapter.js +1 -1
  9. package/dist/adagioRtdProvider.js +1 -1
  10. package/dist/adagioUtils.js +1 -1
  11. package/dist/addefendBidAdapter.js +1 -1
  12. package/dist/adfBidAdapter.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/adxcgAnalyticsAdapter.js +1 -1
  20. package/dist/adxcgBidAdapter.js +1 -1
  21. package/dist/adyoulikeBidAdapter.js +1 -1
  22. package/dist/agmaAnalyticsAdapter.js +1 -1
  23. package/dist/ajaBidAdapter.js +1 -1
  24. package/dist/amxBidAdapter.js +1 -1
  25. package/dist/amxIdSystem.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/axonixBidAdapter.js +1 -1
  30. package/dist/bidglassBidAdapter.js +1 -1
  31. package/dist/big-richmediaBidAdapter.js +1 -1
  32. package/dist/bridBidAdapter.js +1 -1
  33. package/dist/bridgewellBidAdapter.js +1 -1
  34. package/dist/brightMountainMediaBidAdapter.js +1 -1
  35. package/dist/carodaBidAdapter.js +1 -1
  36. package/dist/chtnwBidAdapter.js +1 -1
  37. package/dist/chunk-core.js +1 -1
  38. package/dist/codefuelBidAdapter.js +1 -1
  39. package/dist/concertBidAdapter.js +1 -1
  40. package/dist/connectadBidAdapter.js +1 -1
  41. package/dist/consumableBidAdapter.js +1 -1
  42. package/dist/conversantAnalyticsAdapter.js +1 -1
  43. package/dist/conversantBidAdapter.js +1 -1
  44. package/dist/cpmstarBidAdapter.js +1 -1
  45. package/dist/craftBidAdapter.js +1 -1
  46. package/dist/criteoBidAdapter.js +1 -1
  47. package/dist/cwireBidAdapter.js +1 -1
  48. package/dist/dailymotionBidAdapter.js +1 -1
  49. package/dist/deltaprojectsBidAdapter.js +1 -1
  50. package/dist/dependencies.json +33 -9
  51. package/dist/dianomiBidAdapter.js +1 -1
  52. package/dist/dspxBidAdapter.js +1 -1
  53. package/dist/dxkultureBidAdapter.js +1 -1
  54. package/dist/eplanningBidAdapter.js +1 -1
  55. package/dist/euidIdSystem.js +1 -1
  56. package/dist/exadsBidAdapter.js +1 -1
  57. package/dist/feedadBidAdapter.js +1 -1
  58. package/dist/finativeBidAdapter.js +1 -1
  59. package/dist/freewheel-sspBidAdapter.js +1 -1
  60. package/dist/gmosspBidAdapter.js +1 -1
  61. package/dist/goldbachBidAdapter.js +1 -1
  62. package/dist/greenbidsAnalyticsAdapter.js +1 -1
  63. package/dist/greenbidsRtdProvider.js +1 -1
  64. package/dist/gridBidAdapter.js +1 -1
  65. package/dist/gumgumBidAdapter.js +1 -1
  66. package/dist/h12mediaBidAdapter.js +1 -1
  67. package/dist/hypelabBidAdapter.js +1 -1
  68. package/dist/id5AnalyticsAdapter.js +1 -1
  69. package/dist/id5IdSystem.js +1 -1
  70. package/dist/illuminBidAdapter.js +1 -1
  71. package/dist/imdsBidAdapter.js +1 -1
  72. package/dist/improvedigitalBidAdapter.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/kimberliteBidAdapter.js +1 -1
  79. package/dist/konduitAnalyticsAdapter.js +1 -1
  80. package/dist/kueezBidAdapter.js +1 -1
  81. package/dist/kueezRtbBidAdapter.js +1 -1
  82. package/dist/lassoBidAdapter.js +1 -1
  83. package/dist/lifestreetBidAdapter.js +1 -1
  84. package/dist/liveIntentIdSystem.js +1 -1
  85. package/dist/logicadBidAdapter.js +1 -1
  86. package/dist/loglyliftBidAdapter.js +1 -1
  87. package/dist/luceadBidAdapter.js +1 -1
  88. package/dist/luponmediaBidAdapter.js +1 -1
  89. package/dist/mabidderBidAdapter.js +1 -1
  90. package/dist/magniteAnalyticsAdapter.js +1 -1
  91. package/dist/malltvAnalyticsAdapter.js +1 -1
  92. package/dist/marsmediaBidAdapter.js +1 -1
  93. package/dist/mediafuseBidAdapter.js +1 -1
  94. package/dist/medianetAnalyticsAdapter.js +1 -1
  95. package/dist/medianetBidAdapter.js +1 -1
  96. package/dist/mediasquareBidAdapter.js +1 -1
  97. package/dist/mgidBidAdapter.js +1 -1
  98. package/dist/minutemediaBidAdapter.js +1 -1
  99. package/dist/missenaBidAdapter.js +1 -1
  100. package/dist/nexx360BidAdapter.js +1 -1
  101. package/dist/nobidAnalyticsAdapter.js +1 -1
  102. package/dist/nobidBidAdapter.js +1 -1
  103. package/dist/not-for-prod/prebid.js +171 -170
  104. package/dist/oguryBidAdapter.js +1 -1
  105. package/dist/onetagBidAdapter.js +1 -1
  106. package/dist/ooloAnalyticsAdapter.js +1 -1
  107. package/dist/openwebBidAdapter.js +1 -1
  108. package/dist/openxBidAdapter.js +1 -1
  109. package/dist/optidigitalBidAdapter.js +1 -1
  110. package/dist/orbidderBidAdapter.js +1 -1
  111. package/dist/outbrainBidAdapter.js +1 -1
  112. package/dist/ozoneBidAdapter.js +1 -1
  113. package/dist/pixfutureBidAdapter.js +1 -1
  114. package/dist/processResponse.js +1 -0
  115. package/dist/publinkIdSystem.js +1 -1
  116. package/dist/publirBidAdapter.js +1 -1
  117. package/dist/pubmaticAnalyticsAdapter.js +1 -1
  118. package/dist/pubmaticBidAdapter.js +1 -1
  119. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  120. package/dist/pxyzBidAdapter.js +1 -1
  121. package/dist/quantcastBidAdapter.js +1 -1
  122. package/dist/readpeakBidAdapter.js +1 -1
  123. package/dist/relaidoBidAdapter.js +1 -1
  124. package/dist/retailspotBidAdapter.js +1 -1
  125. package/dist/rhythmoneBidAdapter.js +1 -1
  126. package/dist/riseBidAdapter.js +1 -1
  127. package/dist/rubiconBidAdapter.js +1 -1
  128. package/dist/seedingAllianceBidAdapter.js +1 -1
  129. package/dist/seedtagBidAdapter.js +1 -1
  130. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  131. package/dist/sharethroughBidAdapter.js +1 -1
  132. package/dist/shinezBidAdapter.js +1 -1
  133. package/dist/shinezRtbBidAdapter.js +1 -1
  134. package/dist/smaatoBidAdapter.js +1 -1
  135. package/dist/smartadserverBidAdapter.js +1 -1
  136. package/dist/smartxBidAdapter.js +1 -1
  137. package/dist/smilewantedBidAdapter.js +1 -1
  138. package/dist/snigelBidAdapter.js +1 -1
  139. package/dist/sonobiBidAdapter.js +1 -1
  140. package/dist/sovrnBidAdapter.js +1 -1
  141. package/dist/sspBCBidAdapter.js +1 -1
  142. package/dist/stnBidAdapter.js +1 -1
  143. package/dist/stvBidAdapter.js +1 -1
  144. package/dist/sublimeBidAdapter.js +1 -1
  145. package/dist/taboolaBidAdapter.js +1 -1
  146. package/dist/tagorasBidAdapter.js +1 -1
  147. package/dist/tappxBidAdapter.js +1 -1
  148. package/dist/targetVideoBidAdapter.js +1 -1
  149. package/dist/teadsBidAdapter.js +1 -1
  150. package/dist/terceptAnalyticsAdapter.js +1 -1
  151. package/dist/themoneytizerBidAdapter.js +1 -1
  152. package/dist/trionBidAdapter.js +1 -1
  153. package/dist/tripleliftBidAdapter.js +1 -1
  154. package/dist/ttdBidAdapter.js +1 -1
  155. package/dist/twistDigitalBidAdapter.js +1 -1
  156. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  157. package/dist/uid2IdSystem.js +1 -1
  158. package/dist/underdogmediaBidAdapter.js +1 -1
  159. package/dist/undertoneBidAdapter.js +1 -1
  160. package/dist/unrulyBidAdapter.js +1 -1
  161. package/dist/viantOrtbBidAdapter.js +1 -1
  162. package/dist/vidazooBidAdapter.js +1 -1
  163. package/dist/vidazooUtils.js +1 -1
  164. package/dist/videobyteBidAdapter.js +1 -1
  165. package/dist/visxBidAdapter.js +1 -1
  166. package/dist/vuukleBidAdapter.js +1 -1
  167. package/dist/widespaceBidAdapter.js +1 -1
  168. package/dist/winrBidAdapter.js +1 -1
  169. package/dist/yahooAdsBidAdapter.js +1 -1
  170. package/dist/yieldmoBidAdapter.js +1 -1
  171. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  172. package/dist/zeta_global_sspBidAdapter.js +1 -1
  173. package/integrationExamples/gpt/x-domain/creative.html +1 -1
  174. package/libraries/processResponse/index.js +12 -0
  175. package/libraries/vidazooUtils/bidderUtils.js +9 -10
  176. package/modules/adagioRtdProvider.js +9 -7
  177. package/modules/adfBidAdapter.js +1 -10
  178. package/modules/carodaBidAdapter.js +3 -8
  179. package/modules/codefuelBidAdapter.js +1 -10
  180. package/modules/cpmstarBidAdapter.js +52 -36
  181. package/modules/cpmstarBidAdapter.md +1 -4
  182. package/modules/dailymotionBidAdapter.js +1 -1
  183. package/modules/deltaprojectsBidAdapter.js +2 -11
  184. package/modules/dianomiBidAdapter.js +1 -9
  185. package/modules/finativeBidAdapter.js +1 -10
  186. package/modules/gridBidAdapter.js +2 -12
  187. package/modules/illuminBidAdapter.js +9 -304
  188. package/modules/kueezRtbBidAdapter.js +17 -312
  189. package/modules/luponmediaBidAdapter.js +4 -10
  190. package/modules/mgidBidAdapter.js +1 -10
  191. package/modules/outbrainBidAdapter.js +8 -43
  192. package/modules/ozoneBidAdapter.js +9 -7
  193. package/modules/shinezRtbBidAdapter.js +12 -304
  194. package/modules/tagorasBidAdapter.js +13 -316
  195. package/modules/twistDigitalBidAdapter.js +9 -422
  196. package/modules/viantOrtbBidAdapter.js +20 -0
  197. package/modules/vidazooBidAdapter.js +3 -3
  198. package/modules/visxBidAdapter.js +27 -29
  199. package/modules/zeta_global_sspBidAdapter.js +2 -2
  200. package/package.json +1 -1
  201. package/src/adRendering.js +25 -2
  202. package/src/constants.js +2 -0
  203. package/src/prebid.js +2 -1
  204. package/src/utils.js +19 -1
  205. package/test/spec/creative/crossDomainCreative_spec.js +38 -2
  206. package/test/spec/libraries/processResponse_spec.js +60 -0
  207. package/test/spec/modules/adagioRtdProvider_spec.js +12 -0
  208. package/test/spec/modules/cpmstarBidAdapter_spec.js +1 -1
  209. package/test/spec/modules/dailymotionBidAdapter_spec.js +18 -14
  210. package/test/spec/modules/illuminBidAdapter_spec.js +26 -13
  211. package/test/spec/modules/kueezRtbBidAdapter_spec.js +26 -15
  212. package/test/spec/modules/outbrainBidAdapter_spec.js +32 -1
  213. package/test/spec/modules/shinezRtbBidAdapter_spec.js +26 -14
  214. package/test/spec/modules/tagorasBidAdapter_spec.js +26 -15
  215. package/test/spec/modules/twistDigitalBidAdapter_spec.js +15 -20
  216. package/test/spec/modules/viantOrtbBidAdapter_spec.js +87 -6
  217. package/test/spec/modules/visxBidAdapter_spec.js +180 -0
  218. package/test/spec/modules/zeta_global_sspBidAdapter_spec.js +11 -0
  219. package/test/spec/unit/pbjs_api_spec.js +6 -1
package/src/utils.js CHANGED
@@ -4,8 +4,9 @@ import {includes} from './polyfill.js';
4
4
  import { EVENTS, S2S } from './constants.js';
5
5
  import {GreedyPromise} from './utils/promise.js';
6
6
  import {getGlobal} from './prebidGlobal.js';
7
+ import { default as deepAccess } from 'dlv/index.js';
7
8
 
8
- export { default as deepAccess } from 'dlv/index.js';
9
+ export { deepAccess };
9
10
  export { dset as deepSetValue } from 'dset';
10
11
 
11
12
  var tStr = 'String';
@@ -1231,3 +1232,20 @@ export function hasNonSerializableProperty(obj, checkedObjects = new Set()) {
1231
1232
  }
1232
1233
  return false;
1233
1234
  }
1235
+
1236
+ /**
1237
+ * Returns the value of a nested property in an array of objects.
1238
+ *
1239
+ * @param {Array} collection - Array of objects.
1240
+ * @param {String} key - Key of nested property.
1241
+ * @returns {any, undefined} - Value of nested property.
1242
+ */
1243
+ export function setOnAny(collection, key) {
1244
+ for (let i = 0, result; i < collection.length; i++) {
1245
+ result = deepAccess(collection[i], key);
1246
+ if (result) {
1247
+ return result;
1248
+ }
1249
+ }
1250
+ return undefined;
1251
+ }
@@ -9,12 +9,18 @@ import {
9
9
 
10
10
  describe('cross-domain creative', () => {
11
11
  const ORIGIN = 'https://example.com';
12
- let win, renderAd, messages, mkIframe;
12
+ let win, top, renderAd, messages, mkIframe;
13
13
 
14
14
  beforeEach(() => {
15
15
  messages = [];
16
16
  mkIframe = sinon.stub();
17
+ top = {
18
+ frames: {}
19
+ };
20
+ top.top = top;
17
21
  win = {
22
+ top,
23
+ frames: {},
18
24
  document: {
19
25
  body: {
20
26
  appendChild: sinon.stub(),
@@ -30,12 +36,14 @@ describe('cross-domain creative', () => {
30
36
  })
31
37
  },
32
38
  parent: {
39
+ parent: top,
40
+ frames: {'__pb_locator__': {}},
33
41
  postMessage: sinon.stub().callsFake((payload, targetOrigin, transfer) => {
34
42
  messages.push({payload: JSON.parse(payload), targetOrigin, transfer});
35
43
  })
36
44
  }
37
45
  };
38
- renderAd = renderer(win);
46
+ renderAd = (...args) => renderer(win)(...args);
39
47
  })
40
48
 
41
49
  function waitFor(predicate, timeout = 1000) {
@@ -64,6 +72,34 @@ describe('cross-domain creative', () => {
64
72
  expect(messages[0].targetOrigin).to.eql('https://domain.com:123')
65
73
  });
66
74
 
75
+ it('posts to first parent if no __pb_locator__ can be found', () => {
76
+ delete win.parent.frames['__pb_locator__'];
77
+ renderAd({pubUrl: 'https://www.example.com'});
78
+ expect(messages.length).to.eql(1);
79
+ })
80
+
81
+ describe('when there are multiple ancestors', () => {
82
+ let target;
83
+ beforeEach(() => {
84
+ target = win.parent;
85
+ win.parent = {
86
+ top,
87
+ frames: {},
88
+ parent: {
89
+ ...target,
90
+ parent: {
91
+ frames: {'__pb_locator__': {}},
92
+ top
93
+ }
94
+ }
95
+ }
96
+ })
97
+ it('posts message to the first ancestor with __pb_locator__ child', () => {
98
+ renderAd({pubUrl: 'https://www.example.com'});
99
+ expect(messages.length).to.eql(1);
100
+ });
101
+ })
102
+
67
103
  it('generates request message with adId and clickUrl', () => {
68
104
  renderAd({adId: '123', clickUrl: 'https://click-url.com', pubUrl: ORIGIN});
69
105
  expect(messages[0].payload).to.eql({
@@ -0,0 +1,60 @@
1
+ import { getBidFromResponse } from '../../../libraries/processResponse/index.js';
2
+ import {expect} from 'chai/index.js';
3
+
4
+ describe('processResponse', function () {
5
+ const respItem = {
6
+ 'bid': [
7
+ {
8
+ 'price': 0.504,
9
+ 'ext': {
10
+ 'visx': {
11
+ 'events': {
12
+ 'runtime': '//t.visx.net/track/status/RFTFjZflStSUyuXuyT2IKOZMVPUIiPkzebpPWYwKvNkE_IybYfFxk2P5feBnt9LhiR7291KTG11JjrnyHyhVKfolH_VRCmGppbnHXHfHJ9AgNqjhFB_yTg3m18wGO9k4LOddGAg3mk8qc5zYEIzNsPFnZzos1EkHh5WNs0EjrBpwCgTERUqM3PJD_Zy60nMDA-LCuq-Z4JNBGC_GHx4LwvwXipQsjdGHS-HkqHHf9sES45OlRrW4wMf69dsmey1gvwqFAhJwii2lzo9wfOohLCMRa3Vxd-zvzx-uw71maWOyKnJXWiP6c5xkyrfV4gukNYaDUgrHc0mA0yhqyiHxe8KzEl32rxQXJRCg4FoJcJ1g9jmpZQBnIh2QrKm5iC159elwzwf31_v3Uw97Zpek8j0CCLa8FjxSjvXm1Mq8x4jcwlt0ngfWU6WwyyKwX_GMbKWuAL_nrfxSvs1hZCb4eunEFyXb2lN2olWo8ezMEzZ8YRxF_mx0hDB3NXyV0Tb4b6KXQq7tvxV-1rKPRt7DySRTbLPht0hO3mjTHxutfihnuL6ROEr372gSAiDodnbdCq_lPsCsUSEpG7DmN-4In10uSp2MemjfbqI6tllOCO-j6Pm9mhdl_rT4anHmRG2DG_dLsfD7pLaAsgf2zl2bpawhxxLVjTxikoWjNKAvr_GNh4adHGj5EHbqaBaHovB573Yk-koHkyBNrebeiy-1-Knc28MWOpFi9XKjNsXx756jAXLx2H098ptaXF3mFiuT2Iv6sTVjqOI/{STATUS_CODE}'
13
+ }
14
+ },
15
+ 'prebid': {
16
+ 'events': {
17
+ 'pending': '//t.visx.net/track/pending/RFTFjZflStSUyuXuyT2IKOZMVPUIiPkzebpPWYwKvNkE_IybYfFxk2P5feBnt9LhiR7291KTG11JjrnyHyhVKfolH_VRCmGppbnHXHfHJ9AgNqjhFB_yTg3m18wGO9k4LOddGAg3mk8qc5zYEIzNsPFnZzos1EkHh5WNs0EjrBpwCgTERUqM3PJD_Zy60nMDA-LCuq-Z4JNBGC_GHx4LwvwXipQsjdGHS-HkqHHf9sES45OlRrW4wMf69dsmey1gvwqFAhJwii2lzo9wfOohLCMRa3Vxd-zvzx-uw71maWOyKnJXWiP6c5xkyrfV4gukNYaDUgrHc0mA0yhqyiHxe8KzEl32rxQXJRCg4FoJcJ1g9jmpZQBnIh2QrKm5iC159elwzwf31_v3Uw97Zpek8j0CCLa8FjxSjvXm1Mq8x4jcwlt0ngfWU6WwyyKwX_GMbKWuAL_nrfxSvs1hZCb4eunEFyXb2lN2olWo8ezMEzZ8YRxF_mx0hDB3NXyV0Tb4b6KXQq7tvxV-1rKPRt7DySRTbLPht0hO3mjTHxutfihnuL6ROEr372gSAiDodnbdCq_lPsCsUSEpG7DmN-4In10uSp2MemjfbqI6tllOCO-j6Pm9mhdl_rT4anHmRG2DG_dLsfD7pLaAsgf2zl2bpawhxxLVjTxikoWjNKAvr_GNh4adHGj5EHbqaBaHovB573Yk-koHkyBNrebeiy-1-Knc28MWOpFi9XKjNsXx756jAXLx2H098ptaXF3mFiuT2Iv6sTVjqOI/',
18
+ 'win': '//t.visx.net/track/win/RFTFjZflStSUyuXuyT2IKOZMVPUIiPkzebpPWYwKvNkE_IybYfFxk2P5feBnt9LhiR7291KTG11JjrnyHyhVKfolH_VRCmGppbnHXHfHJ9AgNqjhFB_yTg3m18wGO9k4LOddGAg3mk8qc5zYEIzNsPFnZzos1EkHh5WNs0EjrBpwCgTERUqM3PJD_Zy60nMDA-LCuq-Z4JNBGC_GHx4LwvwXipQsjdGHS-HkqHHf9sES45OlRrW4wMf69dsmey1gvwqFAhJwii2lzo9wfOohLCMRa3Vxd-zvzx-uw71maWOyKnJXWiP6c5xkyrfV4gukNYaDUgrHc0mA0yhqyiHxe8KzEl32rxQXJRCg4FoJcJ1g9jmpZQBnIh2QrKm5iC159elwzwf31_v3Uw97Zpek8j0CCLa8FjxSjvXm1Mq8x4jcwlt0ngfWU6WwyyKwX_GMbKWuAL_nrfxSvs1hZCb4eunEFyXb2lN2olWo8ezMEzZ8YRxF_mx0hDB3NXyV0Tb4b6KXQq7tvxV-1rKPRt7DySRTbLPht0hO3mjTHxutfihnuL6ROEr372gSAiDodnbdCq_lPsCsUSEpG7DmN-4In10uSp2MemjfbqI6tllOCO-j6Pm9mhdl_rT4anHmRG2DG_dLsfD7pLaAsgf2zl2bpawhxxLVjTxikoWjNKAvr_GNh4adHGj5EHbqaBaHovB573Yk-koHkyBNrebeiy-1-Knc28MWOpFi9XKjNsXx756jAXLx2H098ptaXF3mFiuT2Iv6sTVjqOI/',
19
+ 'bid_timeout': '//t.visx.net/track/bid_timeout/RFTFjZflStSUyuXuyT2IKOZMVPUIiPkzebpPWYwKvNkE_IybYfFxk2P5feBnt9LhiR7291KTG11JjrnyHyhVKfolH_VRCmGppbnHXHfHJ9AgNqjhFB_yTg3m18wGO9k4LOddGAg3mk8qc5zYEIzNsPFnZzos1EkHh5WNs0EjrBpwCgTERUqM3PJD_Zy60nMDA-LCuq-Z4JNBGC_GHx4LwvwXipQsjdGHS-HkqHHf9sES45OlRrW4wMf69dsmey1gvwqFAhJwii2lzo9wfOohLCMRa3Vxd-zvzx-uw71maWOyKnJXWiP6c5xkyrfV4gukNYaDUgrHc0mA0yhqyiHxe8KzEl32rxQXJRCg4FoJcJ1g9jmpZQBnIh2QrKm5iC159elwzwf31_v3Uw97Zpek8j0CCLa8FjxSjvXm1Mq8x4jcwlt0ngfWU6WwyyKwX_GMbKWuAL_nrfxSvs1hZCb4eunEFyXb2lN2olWo8ezMEzZ8YRxF_mx0hDB3NXyV0Tb4b6KXQq7tvxV-1rKPRt7DySRTbLPht0hO3mjTHxutfihnuL6ROEr372gSAiDodnbdCq_lPsCsUSEpG7DmN-4In10uSp2MemjfbqI6tllOCO-j6Pm9mhdl_rT4anHmRG2DG_dLsfD7pLaAsgf2zl2bpawhxxLVjTxikoWjNKAvr_GNh4adHGj5EHbqaBaHovB573Yk-koHkyBNrebeiy-1-Knc28MWOpFi9XKjNsXx756jAXLx2H098ptaXF3mFiuT2Iv6sTVjqOI/',
20
+ 'runtime': '//t.visx.net/track/status/RFTFjZflStSUyuXuyT2IKOZMVPUIiPkzebpPWYwKvNkE_IybYfFxk2P5feBnt9LhiR7291KTG11JjrnyHyhVKfolH_VRCmGppbnHXHfHJ9AgNqjhFB_yTg3m18wGO9k4LOddGAg3mk8qc5zYEIzNsPFnZzos1EkHh5WNs0EjrBpwCgTERUqM3PJD_Zy60nMDA-LCuq-Z4JNBGC_GHx4LwvwXipQsjdGHS-HkqHHf9sES45OlRrW4wMf69dsmey1gvwqFAhJwii2lzo9wfOohLCMRa3Vxd-zvzx-uw71maWOyKnJXWiP6c5xkyrfV4gukNYaDUgrHc0mA0yhqyiHxe8KzEl32rxQXJRCg4FoJcJ1g9jmpZQBnIh2QrKm5iC159elwzwf31_v3Uw97Zpek8j0CCLa8FjxSjvXm1Mq8x4jcwlt0ngfWU6WwyyKwX_GMbKWuAL_nrfxSvs1hZCb4eunEFyXb2lN2olWo8ezMEzZ8YRxF_mx0hDB3NXyV0Tb4b6KXQq7tvxV-1rKPRt7DySRTbLPht0hO3mjTHxutfihnuL6ROEr372gSAiDodnbdCq_lPsCsUSEpG7DmN-4In10uSp2MemjfbqI6tllOCO-j6Pm9mhdl_rT4anHmRG2DG_dLsfD7pLaAsgf2zl2bpawhxxLVjTxikoWjNKAvr_GNh4adHGj5EHbqaBaHovB573Yk-koHkyBNrebeiy-1-Knc28MWOpFi9XKjNsXx756jAXLx2H098ptaXF3mFiuT2Iv6sTVjqOI/{STATUS_CODE}'
21
+ },
22
+ 'meta': {
23
+ 'mediaType': 'banner'
24
+ }
25
+ }
26
+ },
27
+ 'impid': '2b642c27bdcf8f',
28
+ 'auid': 929004,
29
+ 'h': 250,
30
+ 'cur': 'EUR',
31
+ 'adomain': [
32
+ ''
33
+ ],
34
+ 'w': 300,
35
+ 'id': '9b6c7e04-0a09-4add-8ba9-0c8b98304de3'
36
+ }
37
+ ],
38
+ 'seat': '1429601'
39
+ };
40
+ const LOG_ERROR_MESS = {
41
+ 'noAuid': 'Bid from response has no auid parameter - ',
42
+ 'noAdm': 'Bid from response has no adm parameter - ',
43
+ 'noBid': 'Array of bid objects is empty',
44
+ 'noImpId': 'Bid from response has no impid parameter - ',
45
+ 'noPlacementCode': 'Can\'t find in requested bids the bid with auid - ',
46
+ 'emptyUids': 'Uids should not be empty',
47
+ 'emptySeatbid': 'Seatbid array from response has an empty item',
48
+ 'emptyResponse': 'Response is empty',
49
+ 'hasEmptySeatbidArray': 'Response has empty seatbid array',
50
+ 'hasNoArrayOfBids': 'Seatbid from response has no array of bid objects - ',
51
+ 'notAllowedCurrency': 'Currency is not supported - ',
52
+ 'currencyMismatch': 'Currency from the request is not match currency from the response - ',
53
+ 'onlyVideoInstream': 'Only video instream supported',
54
+ 'videoMissing': 'Bid request videoType property is missing - '
55
+ };
56
+ it('returns bid when respItem and LOG_ERROR_MESS is passed', function () {
57
+ let response = getBidFromResponse(respItem, LOG_ERROR_MESS);
58
+ expect(response).not.include.any.keys('emptyResponse', 'hasNoArrayOfBids', 'emptySeatbid');
59
+ });
60
+ });
@@ -436,6 +436,18 @@ describe('Adagio Rtd Provider', function () {
436
436
  expect(bidRequest.adUnits[0]).to.have.property('ortb2Imp');
437
437
  expect(bidRequest.adUnits[0].ortb2Imp.ext.data.placement).to.not.exist;
438
438
  });
439
+
440
+ it('ensure we create the `ortb2Imp` object if it does not exist', function() {
441
+ const configCopy = utils.deepClone(config);
442
+ configCopy.params.placementSource = PLACEMENT_SOURCES.ADUNITCODE;
443
+
444
+ const bidRequest = utils.deepClone(bidReqConfig);
445
+ delete bidRequest.adUnits[0].ortb2Imp;
446
+
447
+ adagioRtdSubmodule.getBidRequestData(bidRequest, cb, configCopy);
448
+ expect(bidRequest.adUnits[0]).to.have.property('ortb2Imp');
449
+ expect(bidRequest.adUnits[0].ortb2Imp.ext.data.placement).to.equal('div-gpt-ad-1460505748561-0');
450
+ });
439
451
  });
440
452
  });
441
453
 
@@ -149,7 +149,7 @@ describe('Cpmstar Bid Adapter', function () {
149
149
  };
150
150
  var requests = spec.buildRequests(reqs, bidderRequest);
151
151
  expect(requests[0]).to.have.property('url');
152
- expect(requests[0].url).to.include('&schain=1.0,1!exchange1.com,1234,1,,,!exchange2.com,abcd,1,,,');
152
+ expect(requests[0].url).to.include('&schain=1.0%2C1%21exchange1.com%2C1234%2C1%2C%2C%2C%21exchange2.com%2Cabcd%2C1%2C%2C%2C');
153
153
  });
154
154
 
155
155
  describe('interpretResponse', function () {
@@ -647,7 +647,7 @@ describe('dailymotionBidAdapterTests', () => {
647
647
 
648
648
  // No permissions
649
649
  {
650
- const responses = [{ user_syncs: [{ url: 'https://usersyncurl.com', type: 'image' }] }];
650
+ const responses = [{ body: { userSyncs: [{ url: 'https://usersyncurl.com', type: 'image' }] } }];
651
651
  const syncOptions = { iframeEnabled: false, pixelEnabled: false };
652
652
 
653
653
  expect(config.runWithBidder(
@@ -656,7 +656,7 @@ describe('dailymotionBidAdapterTests', () => {
656
656
  )).to.eql([]);
657
657
  }
658
658
 
659
- // Has permissions but no user_syncs urls
659
+ // Has permissions but no userSyncs urls
660
660
  {
661
661
  const responses = [{}];
662
662
  const syncOptions = { iframeEnabled: false, pixelEnabled: true };
@@ -667,14 +667,16 @@ describe('dailymotionBidAdapterTests', () => {
667
667
  )).to.eql([]);
668
668
  }
669
669
 
670
- // Return user_syncs urls for pixels
670
+ // Return userSyncs urls for pixels
671
671
  {
672
672
  const responses = [{
673
- user_syncs: [
674
- { url: 'https://usersyncurl.com', type: 'image' },
675
- { url: 'https://usersyncurl2.com', type: 'image' },
676
- { url: 'https://usersyncurl3.com', type: 'iframe' }
677
- ],
673
+ body: {
674
+ userSyncs: [
675
+ { url: 'https://usersyncurl.com', type: 'image' },
676
+ { url: 'https://usersyncurl2.com', type: 'image' },
677
+ { url: 'https://usersyncurl3.com', type: 'iframe' }
678
+ ],
679
+ }
678
680
  }];
679
681
 
680
682
  const syncOptions = { iframeEnabled: false, pixelEnabled: true };
@@ -688,14 +690,16 @@ describe('dailymotionBidAdapterTests', () => {
688
690
  ]);
689
691
  }
690
692
 
691
- // Return user_syncs urls for iframes
693
+ // Return userSyncs urls for iframes
692
694
  {
693
695
  const responses = [{
694
- user_syncs: [
695
- { url: 'https://usersyncurl.com', type: 'image' },
696
- { url: 'https://usersyncurl2.com', type: 'image' },
697
- { url: 'https://usersyncurl3.com', type: 'iframe' }
698
- ],
696
+ body: {
697
+ userSyncs: [
698
+ { url: 'https://usersyncurl.com', type: 'image' },
699
+ { url: 'https://usersyncurl2.com', type: 'image' },
700
+ { url: 'https://usersyncurl3.com', type: 'iframe' }
701
+ ],
702
+ }
699
703
  }];
700
704
 
701
705
  const syncOptions = { iframeEnabled: true, pixelEnabled: true };
@@ -2,6 +2,14 @@ import {expect} from 'chai';
2
2
  import {
3
3
  spec as adapter,
4
4
  createDomain,
5
+ storage
6
+ } from 'modules/illuminBidAdapter.js';
7
+ import * as utils from 'src/utils.js';
8
+ import {version} from 'package.json';
9
+ import {useFakeTimers} from 'sinon';
10
+ import {BANNER, VIDEO} from '../../../src/mediaTypes';
11
+ import {config} from '../../../src/config';
12
+ import {
5
13
  hashCode,
6
14
  extractPID,
7
15
  extractCID,
@@ -10,12 +18,7 @@ import {
10
18
  setStorageItem,
11
19
  tryParseJSON,
12
20
  getUniqueDealId,
13
- } from 'modules/illuminBidAdapter.js';
14
- import * as utils from 'src/utils.js';
15
- import {version} from 'package.json';
16
- import {useFakeTimers} from 'sinon';
17
- import {BANNER, VIDEO} from '../../../src/mediaTypes';
18
- import {config} from '../../../src/config';
21
+ } from '../../../libraries/vidazooUtils/bidderUtils.js';
19
22
 
20
23
  export const TEST_ID_SYSTEMS = ['criteoId', 'id5id', 'idl_env', 'lipb', 'netId', 'pubcid', 'tdid', 'pubProvidedId'];
21
24
 
@@ -325,7 +328,12 @@ describe('IlluminBidAdapter', function () {
325
328
  startdelay: 0
326
329
  }
327
330
  },
328
- gpid: '0123456789'
331
+ gpid: '0123456789',
332
+ cat: [],
333
+ contentData: [],
334
+ isStorageAllowed: true,
335
+ pagecat: [],
336
+ userData: []
329
337
  }
330
338
  });
331
339
  });
@@ -387,6 +395,11 @@ describe('IlluminBidAdapter', function () {
387
395
  uqs: getTopWindowQueryParams(),
388
396
  'ext.param1': 'loremipsum',
389
397
  'ext.param2': 'dolorsitamet',
398
+ cat: [],
399
+ contentData: [],
400
+ isStorageAllowed: true,
401
+ pagecat: [],
402
+ userData: []
390
403
  }
391
404
  });
392
405
  });
@@ -562,13 +575,13 @@ describe('IlluminBidAdapter', function () {
562
575
  const key = 'myKey';
563
576
  let uniqueDealId;
564
577
  beforeEach(() => {
565
- uniqueDealId = getUniqueDealId(key, 0);
578
+ uniqueDealId = getUniqueDealId(storage, key, 0);
566
579
  })
567
580
 
568
581
  it('should get current unique deal id', function (done) {
569
582
  // waiting some time so `now` will become past
570
583
  setTimeout(() => {
571
- const current = getUniqueDealId(key);
584
+ const current = getUniqueDealId(storage, key);
572
585
  expect(current).to.be.equal(uniqueDealId);
573
586
  done();
574
587
  }, 200);
@@ -576,7 +589,7 @@ describe('IlluminBidAdapter', function () {
576
589
 
577
590
  it('should get new unique deal id on expiration', function (done) {
578
591
  setTimeout(() => {
579
- const current = getUniqueDealId(key, 100);
592
+ const current = getUniqueDealId(storage, key, 100);
580
593
  expect(current).to.not.be.equal(uniqueDealId);
581
594
  done();
582
595
  }, 200)
@@ -600,8 +613,8 @@ describe('IlluminBidAdapter', function () {
600
613
  shouldAdvanceTime: true,
601
614
  now
602
615
  });
603
- setStorageItem('myKey', 2020);
604
- const {value, created} = getStorageItem('myKey');
616
+ setStorageItem(storage, 'myKey', 2020);
617
+ const {value, created} = getStorageItem(storage, 'myKey');
605
618
  expect(created).to.be.equal(now);
606
619
  expect(value).to.be.equal(2020);
607
620
  expect(typeof value).to.be.equal('number');
@@ -612,7 +625,7 @@ describe('IlluminBidAdapter', function () {
612
625
  it('should get external stored value', function () {
613
626
  const value = 'superman'
614
627
  window.localStorage.setItem('myExternalKey', value);
615
- const item = getStorageItem('myExternalKey');
628
+ const item = getStorageItem(storage, 'myExternalKey');
616
629
  expect(item).to.be.equal(value);
617
630
  });
618
631
 
@@ -2,6 +2,14 @@ import {expect} from 'chai';
2
2
  import {
3
3
  spec as adapter,
4
4
  createDomain,
5
+ storage
6
+ } from 'modules/kueezRtbBidAdapter.js';
7
+ import * as utils from 'src/utils.js';
8
+ import {version} from 'package.json';
9
+ import {useFakeTimers} from 'sinon';
10
+ import {BANNER, VIDEO} from '../../../src/mediaTypes';
11
+ import {config} from '../../../src/config';
12
+ import {
5
13
  hashCode,
6
14
  extractPID,
7
15
  extractCID,
@@ -10,12 +18,7 @@ import {
10
18
  setStorageItem,
11
19
  tryParseJSON,
12
20
  getUniqueDealId,
13
- } from 'modules/kueezRtbBidAdapter.js';
14
- import * as utils from 'src/utils.js';
15
- import {version} from 'package.json';
16
- import {useFakeTimers} from 'sinon';
17
- import {BANNER, VIDEO} from '../../../src/mediaTypes';
18
- import {config} from '../../../src/config';
21
+ } from '../../../libraries/vidazooUtils/bidderUtils.js';
19
22
 
20
23
  export const TEST_ID_SYSTEMS = ['britepoolid', 'criteoId', 'id5id', 'idl_env', 'lipb', 'netId', 'parrableId', 'pubcid', 'tdid', 'pubProvidedId'];
21
24
 
@@ -322,7 +325,12 @@ describe('KueezRtbBidAdapter', function () {
322
325
  startdelay: 0
323
326
  }
324
327
  },
325
- gpid: ''
328
+ gpid: '',
329
+ cat: [],
330
+ contentData: [],
331
+ isStorageAllowed: true,
332
+ pagecat: [],
333
+ userData: []
326
334
  }
327
335
  });
328
336
  });
@@ -384,6 +392,11 @@ describe('KueezRtbBidAdapter', function () {
384
392
  uqs: getTopWindowQueryParams(),
385
393
  'ext.param1': 'loremipsum',
386
394
  'ext.param2': 'dolorsitamet',
395
+ cat: [],
396
+ contentData: [],
397
+ isStorageAllowed: true,
398
+ pagecat: [],
399
+ userData: []
387
400
  }
388
401
  });
389
402
  });
@@ -526,8 +539,6 @@ describe('KueezRtbBidAdapter', function () {
526
539
  switch (idSystemProvider) {
527
540
  case 'lipb':
528
541
  return {lipbid: id};
529
- case 'parrableId':
530
- return {eid: id};
531
542
  case 'id5id':
532
543
  return {uid: id};
533
544
  default:
@@ -580,13 +591,13 @@ describe('KueezRtbBidAdapter', function () {
580
591
  const key = 'myKey';
581
592
  let uniqueDealId;
582
593
  beforeEach(() => {
583
- uniqueDealId = getUniqueDealId(key, 0);
594
+ uniqueDealId = getUniqueDealId(storage, key, 0);
584
595
  })
585
596
 
586
597
  it('should get current unique deal id', function (done) {
587
598
  // waiting some time so `now` will become past
588
599
  setTimeout(() => {
589
- const current = getUniqueDealId(key);
600
+ const current = getUniqueDealId(storage, key);
590
601
  expect(current).to.be.equal(uniqueDealId);
591
602
  done();
592
603
  }, 200);
@@ -594,7 +605,7 @@ describe('KueezRtbBidAdapter', function () {
594
605
 
595
606
  it('should get new unique deal id on expiration', function (done) {
596
607
  setTimeout(() => {
597
- const current = getUniqueDealId(key, 100);
608
+ const current = getUniqueDealId(storage, key, 100);
598
609
  expect(current).to.not.be.equal(uniqueDealId);
599
610
  done();
600
611
  }, 200)
@@ -618,8 +629,8 @@ describe('KueezRtbBidAdapter', function () {
618
629
  shouldAdvanceTime: true,
619
630
  now
620
631
  });
621
- setStorageItem('myKey', 2020);
622
- const {value, created} = getStorageItem('myKey');
632
+ setStorageItem(storage, 'myKey', 2020);
633
+ const {value, created} = getStorageItem(storage, 'myKey');
623
634
  expect(created).to.be.equal(now);
624
635
  expect(value).to.be.equal(2020);
625
636
  expect(typeof value).to.be.equal('number');
@@ -630,7 +641,7 @@ describe('KueezRtbBidAdapter', function () {
630
641
  it('should get external stored value', function () {
631
642
  const value = 'superman'
632
643
  window.localStorage.setItem('myExternalKey', value);
633
- const item = getStorageItem('myExternalKey');
644
+ const item = getStorageItem(storage, 'myExternalKey');
634
645
  expect(item).to.be.equal(value);
635
646
  });
636
647
 
@@ -65,6 +65,23 @@ describe('Outbrain Adapter', function () {
65
65
  }
66
66
  }
67
67
 
68
+ const ortb2WithDeviceData = {
69
+ ortb2: {
70
+ device: {
71
+ w: 980,
72
+ h: 1720,
73
+ dnt: 0,
74
+ ua: 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/125.0.6422.80 Mobile/15E148 Safari/604.1',
75
+ language: 'en',
76
+ devicetype: 1,
77
+ make: 'Apple',
78
+ model: 'iPhone 12 Pro Max',
79
+ os: 'iOS',
80
+ osv: '17.4'
81
+ }
82
+ }
83
+ };
84
+
68
85
  describe('isBidRequestValid', function () {
69
86
  before(() => {
70
87
  config.setConfig({
@@ -390,7 +407,8 @@ describe('Outbrain Adapter', function () {
390
407
  minduration: 3,
391
408
  maxduration: 10,
392
409
  startdelay: 2,
393
- placement: 4,
410
+ placement: 5,
411
+ plcmt: 4,
394
412
  linearity: 1
395
413
  }
396
414
  }
@@ -620,6 +638,19 @@ describe('Outbrain Adapter', function () {
620
638
  const resData = JSON.parse(res.data)
621
639
  expect(resData.imp[0].native.request).to.equal(JSON.stringify(expectedNativeAssets));
622
640
  });
641
+
642
+ it('should pass ortb2 device data', function () {
643
+ const bidRequest = {
644
+ ...commonBidRequest,
645
+ ...nativeBidRequestParams,
646
+ };
647
+
648
+ const res = spec.buildRequests(
649
+ [bidRequest],
650
+ {...commonBidderRequest, ...ortb2WithDeviceData},
651
+ );
652
+ expect(JSON.parse(res.data).device).to.deep.equal(ortb2WithDeviceData.ortb2.device);
653
+ });
623
654
  })
624
655
 
625
656
  describe('interpretResponse', function () {
@@ -2,6 +2,9 @@ import {expect} from 'chai';
2
2
  import {
3
3
  spec as adapter,
4
4
  createDomain,
5
+ storage
6
+ } from 'modules/shinezRtbBidAdapter';
7
+ import {
5
8
  hashCode,
6
9
  extractPID,
7
10
  extractCID,
@@ -10,13 +13,12 @@ import {
10
13
  setStorageItem,
11
14
  tryParseJSON,
12
15
  getUniqueDealId,
13
- } from 'modules/shinezRtbBidAdapter';
14
- import * as utils from 'src/utils.js';
16
+ } from '../../../libraries/vidazooUtils/bidderUtils.js';
17
+ import {parseUrl, deepClone} from 'src/utils.js';
15
18
  import {version} from 'package.json';
16
19
  import {useFakeTimers} from 'sinon';
17
20
  import {BANNER, VIDEO} from '../../../src/mediaTypes';
18
21
  import {config} from '../../../src/config';
19
- import {deepAccess} from 'src/utils.js';
20
22
 
21
23
  export const TEST_ID_SYSTEMS = ['criteoId', 'id5id', 'idl_env', 'lipb', 'netId', 'pubcid', 'tdid', 'pubProvidedId'];
22
24
 
@@ -181,7 +183,7 @@ const REQUEST = {
181
183
 
182
184
  function getTopWindowQueryParams() {
183
185
  try {
184
- const parsedUrl = utils.parseUrl(window.top.document.URL, {decodeSearchAsString: true});
186
+ const parsedUrl = parseUrl(window.top.document.URL, {decodeSearchAsString: true});
185
187
  return parsedUrl.search;
186
188
  } catch (e) {
187
189
  return '';
@@ -328,7 +330,12 @@ describe('ShinezRtbBidAdapter', function () {
328
330
  startdelay: 0
329
331
  }
330
332
  },
331
- gpid: '0123456789'
333
+ gpid: '0123456789',
334
+ cat: [],
335
+ contentData: [],
336
+ isStorageAllowed: true,
337
+ pagecat: [],
338
+ userData: []
332
339
  }
333
340
  });
334
341
  });
@@ -390,6 +397,11 @@ describe('ShinezRtbBidAdapter', function () {
390
397
  uqs: getTopWindowQueryParams(),
391
398
  'ext.param1': 'loremipsum',
392
399
  'ext.param2': 'dolorsitamet',
400
+ cat: [],
401
+ contentData: [],
402
+ isStorageAllowed: true,
403
+ pagecat: [],
404
+ userData: []
393
405
  }
394
406
  });
395
407
  });
@@ -463,7 +475,7 @@ describe('ShinezRtbBidAdapter', function () {
463
475
  });
464
476
 
465
477
  it('should get meta from response metaData', function () {
466
- const serverResponse = utils.deepClone(SERVER_RESPONSE);
478
+ const serverResponse = deepClone(SERVER_RESPONSE);
467
479
  serverResponse.body.results[0].metaData = {
468
480
  advertiserDomains: ['sweetgum.io'],
469
481
  agencyName: 'Agency Name',
@@ -496,7 +508,7 @@ describe('ShinezRtbBidAdapter', function () {
496
508
  });
497
509
 
498
510
  it('should take default TTL', function () {
499
- const serverResponse = utils.deepClone(SERVER_RESPONSE);
511
+ const serverResponse = deepClone(SERVER_RESPONSE);
500
512
  delete serverResponse.body.results[0].exp;
501
513
  const responses = adapter.interpretResponse(serverResponse, REQUEST);
502
514
  expect(responses).to.have.length(1);
@@ -507,7 +519,7 @@ describe('ShinezRtbBidAdapter', function () {
507
519
  describe('user id system', function () {
508
520
  TEST_ID_SYSTEMS.forEach((idSystemProvider) => {
509
521
  const id = Date.now().toString();
510
- const bid = utils.deepClone(BID);
522
+ const bid = deepClone(BID);
511
523
 
512
524
  const userId = (function () {
513
525
  switch (idSystemProvider) {
@@ -565,13 +577,13 @@ describe('ShinezRtbBidAdapter', function () {
565
577
  const key = 'myKey';
566
578
  let uniqueDealId;
567
579
  beforeEach(() => {
568
- uniqueDealId = getUniqueDealId(key, 0);
580
+ uniqueDealId = getUniqueDealId(storage, key, 0);
569
581
  })
570
582
 
571
583
  it('should get current unique deal id', function (done) {
572
584
  // waiting some time so `now` will become past
573
585
  setTimeout(() => {
574
- const current = getUniqueDealId(key);
586
+ const current = getUniqueDealId(storage, key);
575
587
  expect(current).to.be.equal(uniqueDealId);
576
588
  done();
577
589
  }, 200);
@@ -579,7 +591,7 @@ describe('ShinezRtbBidAdapter', function () {
579
591
 
580
592
  it('should get new unique deal id on expiration', function (done) {
581
593
  setTimeout(() => {
582
- const current = getUniqueDealId(key, 100);
594
+ const current = getUniqueDealId(storage, key, 100);
583
595
  expect(current).to.not.be.equal(uniqueDealId);
584
596
  done();
585
597
  }, 200)
@@ -603,8 +615,8 @@ describe('ShinezRtbBidAdapter', function () {
603
615
  shouldAdvanceTime: true,
604
616
  now
605
617
  });
606
- setStorageItem('myKey', 2020);
607
- const {value, created} = getStorageItem('myKey');
618
+ setStorageItem(storage, 'myKey', 2020);
619
+ const {value, created} = getStorageItem(storage, 'myKey');
608
620
  expect(created).to.be.equal(now);
609
621
  expect(value).to.be.equal(2020);
610
622
  expect(typeof value).to.be.equal('number');
@@ -615,7 +627,7 @@ describe('ShinezRtbBidAdapter', function () {
615
627
  it('should get external stored value', function () {
616
628
  const value = 'superman'
617
629
  window.localStorage.setItem('myExternalKey', value);
618
- const item = getStorageItem('myExternalKey');
630
+ const item = getStorageItem(storage, 'myExternalKey');
619
631
  expect(item).to.be.equal(value);
620
632
  });
621
633