prebid.js 7.3.0 → 7.6.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 (225) hide show
  1. package/.circleci/config.yml +11 -6
  2. package/dist/33acrossBidAdapter.js +1 -1
  3. package/dist/adagioBidAdapter.js +1 -1
  4. package/dist/adbookpspBidAdapter.js +1 -1
  5. package/dist/adgenerationBidAdapter.js +1 -1
  6. package/dist/adnuntiusBidAdapter.js +1 -1
  7. package/dist/adotBidAdapter.js +1 -1
  8. package/dist/adpod.js +1 -1
  9. package/dist/adrelevantisBidAdapter.js +1 -1
  10. package/dist/adrinoBidAdapter.js +1 -1
  11. package/dist/adtelligentBidAdapter.js +1 -1
  12. package/dist/adxcgBidAdapter.js +1 -1
  13. package/dist/ajaBidAdapter.js +1 -1
  14. package/dist/amxBidAdapter.js +1 -1
  15. package/dist/amxIdSystem.js +1 -1
  16. package/dist/appierAnalyticsAdapter.js +1 -1
  17. package/dist/appnexusBidAdapter.js +1 -1
  18. package/dist/asoBidAdapter.js +1 -1
  19. package/dist/atsAnalyticsAdapter.js +1 -1
  20. package/dist/axonixBidAdapter.js +1 -1
  21. package/dist/bidglassBidAdapter.js +1 -1
  22. package/dist/big-richmediaBidAdapter.js +1 -1
  23. package/dist/bridgewellBidAdapter.js +1 -1
  24. package/dist/brightMountainMediaBidAdapter.js +1 -1
  25. package/dist/byDataAnalyticsAdapter.js +1 -1
  26. package/dist/concertBidAdapter.js +1 -1
  27. package/dist/connectadBidAdapter.js +1 -1
  28. package/dist/consumableBidAdapter.js +1 -1
  29. package/dist/conversantBidAdapter.js +1 -1
  30. package/dist/craftBidAdapter.js +1 -1
  31. package/dist/criteoBidAdapter.js +1 -1
  32. package/dist/debugging-standalone.js +1 -1
  33. package/dist/debugging.js +1 -1
  34. package/dist/dspxBidAdapter.js +1 -1
  35. package/dist/eplanningBidAdapter.js +1 -1
  36. package/dist/finativeBidAdapter.js +1 -1
  37. package/dist/gdprEnforcement.js +1 -1
  38. package/dist/glimpseBidAdapter.js +1 -1
  39. package/dist/gmosspBidAdapter.js +1 -1
  40. package/dist/goldbachBidAdapter.js +1 -1
  41. package/dist/gridBidAdapter.js +1 -1
  42. package/dist/gridNMBidAdapter.js +1 -1
  43. package/dist/gumgumBidAdapter.js +1 -1
  44. package/dist/h12mediaBidAdapter.js +1 -1
  45. package/dist/hadronIdSystem.js +1 -1
  46. package/dist/hadronRtdProvider.js +1 -1
  47. package/dist/id5IdSystem.js +1 -1
  48. package/dist/imRtdProvider.js +1 -1
  49. package/dist/improvedigitalBidAdapter.js +1 -1
  50. package/dist/inmarBidAdapter.js +1 -1
  51. package/dist/insticatorBidAdapter.js +1 -1
  52. package/dist/ixBidAdapter.js +1 -1
  53. package/dist/justpremiumBidAdapter.js +1 -1
  54. package/dist/kargoAnalyticsAdapter.js +1 -1
  55. package/dist/kargoBidAdapter.js +1 -1
  56. package/dist/konduitAnalyticsAdapter.js +1 -1
  57. package/dist/kueezBidAdapter.js +1 -1
  58. package/dist/lassoBidAdapter.js +1 -1
  59. package/dist/liveyieldAnalyticsAdapter.js +1 -1
  60. package/dist/logicadBidAdapter.js +1 -1
  61. package/dist/loglyliftBidAdapter.js +1 -1
  62. package/dist/malltvAnalyticsAdapter.js +1 -1
  63. package/dist/marsmediaBidAdapter.js +1 -1
  64. package/dist/mediafuseBidAdapter.js +1 -1
  65. package/dist/mediasquareBidAdapter.js +1 -1
  66. package/dist/mgidBidAdapter.js +1 -1
  67. package/dist/minutemediaBidAdapter.js +1 -1
  68. package/dist/missenaBidAdapter.js +1 -1
  69. package/dist/newspassidBidAdapter.js +1 -0
  70. package/dist/nextMillenniumBidAdapter.js +1 -1
  71. package/dist/not-for-prod/prebid.js +131 -127
  72. package/dist/oguryBidAdapter.js +1 -1
  73. package/dist/onetagBidAdapter.js +1 -1
  74. package/dist/ooloAnalyticsAdapter.js +1 -1
  75. package/dist/openxOrtbBidAdapter.js +1 -0
  76. package/dist/outbrainBidAdapter.js +1 -1
  77. package/dist/parrableIdSystem.js +1 -1
  78. package/dist/pixfutureBidAdapter.js +1 -1
  79. package/dist/prebid-core.js +2 -2
  80. package/dist/priceFloors.js +1 -1
  81. package/dist/pubCommonId.js +1 -1
  82. package/dist/publinkIdSystem.js +1 -1
  83. package/dist/pubmaticBidAdapter.js +1 -1
  84. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  85. package/dist/pubxaiAnalyticsAdapter.js +1 -1
  86. package/dist/pxyzBidAdapter.js +1 -1
  87. package/dist/quantcastBidAdapter.js +1 -1
  88. package/dist/rasBidAdapter.js +1 -0
  89. package/dist/readpeakBidAdapter.js +1 -1
  90. package/dist/relaidoBidAdapter.js +1 -1
  91. package/dist/rhythmoneBidAdapter.js +1 -1
  92. package/dist/riseBidAdapter.js +1 -1
  93. package/dist/rubiconAnalyticsAdapter.js +1 -1
  94. package/dist/rubiconBidAdapter.js +1 -1
  95. package/dist/seedingAllianceBidAdapter.js +1 -1
  96. package/dist/seedtagBidAdapter.js +1 -1
  97. package/dist/sharedIdSystem.js +1 -1
  98. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  99. package/dist/sharethroughBidAdapter.js +1 -1
  100. package/dist/shinezBidAdapter.js +1 -0
  101. package/dist/sizeMappingV2.js +1 -1
  102. package/dist/smaatoBidAdapter.js +1 -1
  103. package/dist/smartadserverBidAdapter.js +1 -1
  104. package/dist/smartxBidAdapter.js +1 -1
  105. package/dist/smilewantedBidAdapter.js +1 -1
  106. package/dist/sonobiBidAdapter.js +1 -1
  107. package/dist/sovrnAnalyticsAdapter.js +1 -1
  108. package/dist/sovrnBidAdapter.js +1 -1
  109. package/dist/sspBCBidAdapter.js +1 -1
  110. package/dist/sublimeBidAdapter.js +1 -1
  111. package/dist/synacormediaBidAdapter.js +1 -1
  112. package/dist/taboolaBidAdapter.js +1 -1
  113. package/dist/targetVideoBidAdapter.js +1 -1
  114. package/dist/teadsBidAdapter.js +1 -1
  115. package/dist/trionBidAdapter.js +1 -1
  116. package/dist/tripleliftBidAdapter.js +1 -1
  117. package/dist/ttdBidAdapter.js +1 -1
  118. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  119. package/dist/underdogmediaBidAdapter.js +1 -1
  120. package/dist/undertoneBidAdapter.js +1 -1
  121. package/dist/ventesBidAdapter.js +1 -1
  122. package/dist/vidazooBidAdapter.js +1 -1
  123. package/dist/videobyteBidAdapter.js +1 -1
  124. package/dist/visxBidAdapter.js +1 -1
  125. package/dist/vrtcalBidAdapter.js +1 -1
  126. package/dist/vuukleBidAdapter.js +1 -1
  127. package/dist/widespaceBidAdapter.js +1 -1
  128. package/dist/winrBidAdapter.js +1 -1
  129. package/dist/yahoosspBidAdapter.js +1 -1
  130. package/dist/yieldmoBidAdapter.js +1 -1
  131. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  132. package/gulpfile.js +1 -1
  133. package/karma.conf.maker.js +3 -1
  134. package/modules/adgenerationBidAdapter.js +24 -1
  135. package/modules/adnuntiusBidAdapter.js +26 -8
  136. package/modules/adotBidAdapter.js +13 -4
  137. package/modules/adrinoBidAdapter.js +10 -2
  138. package/modules/adrinoBidAdapter.md +6 -0
  139. package/modules/adtelligentBidAdapter.js +2 -1
  140. package/modules/appnexusBidAdapter.js +3 -3
  141. package/modules/atsAnalyticsAdapter.js +4 -5
  142. package/modules/byDataAnalyticsAdapter.js +172 -74
  143. package/modules/byDataAnalyticsAdapter.md +5 -6
  144. package/modules/consumableBidAdapter.js +12 -1
  145. package/modules/criteoBidAdapter.js +7 -1
  146. package/modules/cwireBidAdapter.md +1 -1
  147. package/modules/debugging/bidInterceptor.js +1 -1
  148. package/modules/debugging/index.js +2 -1
  149. package/modules/eplanningBidAdapter.js +82 -97
  150. package/modules/gdprEnforcement.js +8 -14
  151. package/modules/gridNMBidAdapter.js +45 -4
  152. package/modules/hadronAnalyticsAdapter.md +5 -5
  153. package/modules/hadronIdSystem.js +18 -5
  154. package/modules/hadronIdSystem.md +15 -11
  155. package/modules/hadronRtdProvider.js +14 -1
  156. package/modules/hadronRtdProvider.md +17 -13
  157. package/modules/imRtdProvider.js +0 -8
  158. package/modules/insticatorBidAdapter.js +9 -0
  159. package/modules/ixBidAdapter.js +462 -58
  160. package/modules/ixBidAdapter.md +95 -5
  161. package/modules/kargoAnalyticsAdapter.js +88 -6
  162. package/modules/kargoAnalyticsAdapter.md +33 -0
  163. package/modules/kargoBidAdapter.js +1 -2
  164. package/modules/minutemediaBidAdapter.js +1 -0
  165. package/modules/missenaBidAdapter.js +20 -2
  166. package/modules/newspassidBidAdapter.js +649 -0
  167. package/modules/nextMillenniumBidAdapter.js +17 -1
  168. package/modules/oguryBidAdapter.js +2 -0
  169. package/modules/openxBidAdapter.md +3 -1
  170. package/modules/openxOrtbBidAdapter.js +349 -0
  171. package/modules/openxOrtbBidAdapter.md +105 -0
  172. package/modules/priceFloors.js +1 -1
  173. package/modules/pubCommonId.js +1 -2
  174. package/modules/pubxaiAnalyticsAdapter.js +6 -1
  175. package/modules/rasBidAdapter.js +149 -0
  176. package/modules/rasBidAdapter.md +50 -0
  177. package/modules/readpeakBidAdapter.js +15 -6
  178. package/modules/relaidoBidAdapter.js +19 -4
  179. package/modules/seedtagBidAdapter.js +37 -1
  180. package/modules/sharedIdSystem.js +11 -5
  181. package/modules/sharethroughBidAdapter.js +9 -24
  182. package/modules/shinezBidAdapter.js +435 -0
  183. package/modules/shinezBidAdapter.md +76 -0
  184. package/modules/taboolaBidAdapter.js +1 -1
  185. package/modules/taboolaBidAdapter.md +3 -3
  186. package/modules/ventesBidAdapter.js +1 -1
  187. package/modules/ventesBidAdapter.md +1 -1
  188. package/modules/vrtcalBidAdapter.js +35 -0
  189. package/package.json +1 -1
  190. package/plugins/pbjsGlobals.js +2 -1
  191. package/src/storageManager.js +4 -5
  192. package/test/spec/modules/adgenerationBidAdapter_spec.js +52 -4
  193. package/test/spec/modules/adnuntiusBidAdapter_spec.js +126 -14
  194. package/test/spec/modules/adotBidAdapter_spec.js +12 -9
  195. package/test/spec/modules/adrinoBidAdapter_spec.js +22 -0
  196. package/test/spec/modules/appnexusBidAdapter_spec.js +165 -156
  197. package/test/spec/modules/byDataAnalyticsAdapter_spec.js +74 -24
  198. package/test/spec/modules/consumableBidAdapter_spec.js +75 -0
  199. package/test/spec/modules/criteoBidAdapter_spec.js +15 -5
  200. package/test/spec/modules/debugging_mod_spec.js +7 -0
  201. package/test/spec/modules/eplanningBidAdapter_spec.js +58 -18
  202. package/test/spec/modules/gdprEnforcement_spec.js +53 -100
  203. package/test/spec/modules/gridNMBidAdapter_spec.js +32 -0
  204. package/test/spec/modules/hadronIdSystem_spec.js +2 -2
  205. package/test/spec/modules/imRtdProvider_spec.js +0 -1
  206. package/test/spec/modules/insticatorBidAdapter_spec.js +22 -1
  207. package/test/spec/modules/ixBidAdapter_spec.js +470 -10
  208. package/test/spec/modules/kargoAnalyticsAdapter_spec.js +42 -0
  209. package/test/spec/modules/kargoBidAdapter_spec.js +1 -0
  210. package/test/spec/modules/minutemediaBidAdapter_spec.js +3 -0
  211. package/test/spec/modules/missenaBidAdapter_spec.js +36 -14
  212. package/test/spec/modules/newspassidBidAdapter_spec.js +1793 -0
  213. package/test/spec/modules/nextMillenniumBidAdapter_spec.js +20 -0
  214. package/test/spec/modules/openxOrtbBidAdapter_spec.js +1303 -0
  215. package/test/spec/modules/pubxaiAnalyticsAdapter_spec.js +5 -0
  216. package/test/spec/modules/rasBidAdapter_spec.js +190 -0
  217. package/test/spec/modules/readpeakBidAdapter_spec.js +1 -0
  218. package/test/spec/modules/relaidoBidAdapter_spec.js +29 -2
  219. package/test/spec/modules/seedtagBidAdapter_spec.js +29 -0
  220. package/test/spec/modules/sharethroughBidAdapter_spec.js +4 -4
  221. package/test/spec/modules/shinezBidAdapter_spec.js +479 -0
  222. package/test/spec/modules/taboolaBidAdapter_spec.js +1 -1
  223. package/test/spec/modules/ventesBidAdapter_spec.js +2 -2
  224. package/test/spec/modules/vrtcalBidAdapter_spec.js +17 -0
  225. package/webpack.conf.js +1 -1
@@ -624,6 +624,11 @@ describe('pubxai analytics adapter', function() {
624
624
  }
625
625
  },
626
626
  'floorProvider': 'PubXFloorProvider',
627
+ 'floorFetchStatus': 'success',
628
+ 'floorLocation': 'fetch',
629
+ 'floorModelVersion': 'test model 1.0',
630
+ 'floorSkipRate': 0,
631
+ 'isFloorSkipped': false,
627
632
  'isWinningBid': true,
628
633
  'mediaType': 'banner',
629
634
  'netRevenue': true,
@@ -0,0 +1,190 @@
1
+ import { expect } from 'chai';
2
+ import { spec } from 'modules/rasBidAdapter.js';
3
+ import { newBidder } from 'src/adapters/bidderFactory.js';
4
+
5
+ const CSR_ENDPOINT = 'https://csr.onet.pl/4178463/csr-006/csr.json?';
6
+
7
+ describe('rasBidAdapter', function () {
8
+ const adapter = newBidder(spec);
9
+
10
+ describe('inherited functions', function () {
11
+ it('exists and is a function', function () {
12
+ expect(adapter.callBids).to.exist.and.to.be.a('function');
13
+ });
14
+ });
15
+
16
+ describe('isBidRequestValid', function () {
17
+ it('should return true when required params found', function () {
18
+ const bid = {
19
+ sizes: [[300, 250], [300, 600]],
20
+ bidder: 'ras',
21
+ params: {
22
+ slot: 'slot',
23
+ area: 'areatest',
24
+ site: 'test',
25
+ network: '4178463'
26
+ }
27
+ };
28
+ expect(spec.isBidRequestValid(bid)).to.equal(true);
29
+ });
30
+
31
+ it('should return false when required params not found', function () {
32
+ const failBid = {
33
+ sizes: [[300, 250], [300, 300]],
34
+ bidder: 'ras',
35
+ params: {
36
+ site: 'test',
37
+ network: '4178463'
38
+ }
39
+ };
40
+ expect(spec.isBidRequestValid(failBid)).to.equal(false);
41
+ });
42
+
43
+ it('should return nothing when bid request is malformed', function () {
44
+ const failBid = {
45
+ sizes: [[300, 250], [300, 300]],
46
+ bidder: 'ras',
47
+ };
48
+ expect(spec.isBidRequestValid(failBid)).to.equal(undefined);
49
+ });
50
+ });
51
+
52
+ describe('buildRequests', function () {
53
+ const bid = {
54
+ sizes: [[300, 250], [300, 600]],
55
+ bidder: 'ras',
56
+ bidId: 1,
57
+ params: {
58
+ slot: 'test',
59
+ area: 'areatest',
60
+ site: 'test',
61
+ network: '4178463'
62
+ }
63
+ };
64
+ const bid2 = {
65
+ sizes: [[750, 300]],
66
+ bidder: 'ras',
67
+ bidId: 2,
68
+ params: {
69
+ slot: 'test2',
70
+ area: 'areatest',
71
+ site: 'test',
72
+ network: '4178463'
73
+ }
74
+ };
75
+
76
+ it('should parse bids to request', function () {
77
+ const requests = spec.buildRequests([bid], {
78
+ 'gdprConsent': {
79
+ 'gdprApplies': true,
80
+ 'consentString': 'some-consent-string'
81
+ },
82
+ 'refererInfo': {
83
+ 'ref': 'https://example.org/',
84
+ 'page': 'https://example.com/'
85
+ }
86
+ });
87
+ expect(requests[0].url).to.have.string(CSR_ENDPOINT);
88
+ expect(requests[0].url).to.have.string('slot0=test');
89
+ expect(requests[0].url).to.have.string('id0=1');
90
+ expect(requests[0].url).to.have.string('site=test');
91
+ expect(requests[0].url).to.have.string('area=areatest');
92
+ expect(requests[0].url).to.have.string('cre_format=html');
93
+ expect(requests[0].url).to.have.string('systems=das');
94
+ expect(requests[0].url).to.have.string('ems_url=1');
95
+ expect(requests[0].url).to.have.string('bid_rate=1');
96
+ expect(requests[0].url).to.have.string('gdpr_applies=true');
97
+ expect(requests[0].url).to.have.string('euconsent=some-consent-string');
98
+ expect(requests[0].url).to.have.string('du=https%3A%2F%2Fexample.com%2F');
99
+ expect(requests[0].url).to.have.string('dr=https%3A%2F%2Fexample.org%2F');
100
+ });
101
+
102
+ it('should return empty consent string when undefined', function () {
103
+ const requests = spec.buildRequests([bid]);
104
+ const gdpr = requests[0].url.search('gdpr_applies');
105
+ const euconsent = requests[0].url.search('euconsent=');
106
+ expect(gdpr).to.equal(-1);
107
+ expect(euconsent).to.equal(-1);
108
+ });
109
+
110
+ it('should parse bids to request from pageContext', function () {
111
+ const bidCopy = { ...bid };
112
+ bidCopy.params = {
113
+ ...bid.params,
114
+ pageContext: {
115
+ dv: 'test/areatest',
116
+ du: 'https://example.com/',
117
+ dr: 'https://example.org/',
118
+ keyWords: ['val1', 'val2'],
119
+ keyValues: {
120
+ adunit: 'test/areatest'
121
+ }
122
+ }
123
+ };
124
+ const requests = spec.buildRequests([bidCopy, bid2]);
125
+ expect(requests[0].url).to.have.string(CSR_ENDPOINT);
126
+ expect(requests[0].url).to.have.string('slot0=test');
127
+ expect(requests[0].url).to.have.string('id0=1');
128
+ expect(requests[0].url).to.have.string('iusizes0=300x250%2C300x600');
129
+ expect(requests[0].url).to.have.string('slot1=test2');
130
+ expect(requests[0].url).to.have.string('id1=2');
131
+ expect(requests[0].url).to.have.string('iusizes1=750x300');
132
+ expect(requests[0].url).to.have.string('site=test');
133
+ expect(requests[0].url).to.have.string('area=areatest');
134
+ expect(requests[0].url).to.have.string('cre_format=html');
135
+ expect(requests[0].url).to.have.string('systems=das');
136
+ expect(requests[0].url).to.have.string('ems_url=1');
137
+ expect(requests[0].url).to.have.string('bid_rate=1');
138
+ expect(requests[0].url).to.have.string('du=https%3A%2F%2Fexample.com%2F');
139
+ expect(requests[0].url).to.have.string('dr=https%3A%2F%2Fexample.org%2F');
140
+ expect(requests[0].url).to.have.string('DV=test%2Fareatest');
141
+ expect(requests[0].url).to.have.string('kwrd=val1%2Bval2');
142
+ expect(requests[0].url).to.have.string('kvadunit=test%2Fareatest');
143
+ });
144
+ });
145
+
146
+ describe('interpretResponse', function () {
147
+ const response = {
148
+ 'adsCheck': 'ok',
149
+ 'geoloc': {},
150
+ 'ir': '92effd60-0c84-4dac-817e-763ea7b8ac65',
151
+ 'ads': [
152
+ {
153
+ 'id': 'flat-belkagorna',
154
+ 'slot': 'flat-belkagorna',
155
+ 'prio': 10,
156
+ 'type': 'html',
157
+ 'bid_rate': 0.321123,
158
+ 'adid': 'das,50463,152276',
159
+ 'id_3': '12734',
160
+ 'html': '<script type=\"text/javascript\">test</script>'
161
+ }
162
+ ],
163
+ 'iv': '202003191334467636346500'
164
+ };
165
+
166
+ it('should get correct bid response', function () {
167
+ const resp = spec.interpretResponse({ body: response }, { bidIds: [{ slot: 'flat-belkagorna', bidId: 1 }] });
168
+ expect(resp[0]).to.have.all.keys('cpm', 'currency', 'netRevenue', 'requestId', 'ttl', 'width', 'height', 'creativeId', 'dealId', 'ad', 'meta');
169
+ expect(resp.length).to.equal(1);
170
+ });
171
+
172
+ it('should handle empty ad', function () {
173
+ let res = {
174
+ 'ads': [{
175
+ type: 'empty'
176
+ }]
177
+ };
178
+ const resp = spec.interpretResponse({ body: res }, {});
179
+ expect(resp).to.deep.equal([]);
180
+ });
181
+
182
+ it('should handle empty server response', function () {
183
+ let res = {
184
+ 'ads': []
185
+ };
186
+ const resp = spec.interpretResponse({ body: res }, {});
187
+ expect(resp).to.deep.equal([]);
188
+ });
189
+ });
190
+ });
@@ -528,6 +528,7 @@ describe('ReadPeakAdapter', function() {
528
528
  ad: bannerServerResponse.seatbid[0].bid[0].adm,
529
529
  width: bannerServerResponse.seatbid[0].bid[0].w,
530
530
  height: bannerServerResponse.seatbid[0].bid[0].h,
531
+ burl: bannerServerResponse.seatbid[0].bid[0].burl,
531
532
  });
532
533
  expect(bidResponse.meta).to.deep.equal({
533
534
  advertiserDomains: ['readpeak.com'],
@@ -81,8 +81,8 @@ describe('RelaidoAdapter', function () {
81
81
  data: {
82
82
  bids: [{
83
83
  bidId: bidRequest.bidId,
84
- width: bidRequest.mediaTypes.video.playerSize[0][0],
85
- height: bidRequest.mediaTypes.video.playerSize[0][1],
84
+ width: bidRequest.mediaTypes.video.playerSize[0][0] || bidRequest.mediaTypes.video.playerSize[0],
85
+ height: bidRequest.mediaTypes.video.playerSize[0][1] || bidRequest.mediaTypes.video.playerSize[1],
86
86
  mediaType: 'video'}]
87
87
  }
88
88
  };
@@ -98,6 +98,33 @@ describe('RelaidoAdapter', function () {
98
98
  expect(spec.isBidRequestValid(bidRequest)).to.equal(true);
99
99
  });
100
100
 
101
+ it('should return true when not existed mediaTypes.video.playerSize and existed valid params.video.playerSize by video', function () {
102
+ bidRequest.mediaTypes = {
103
+ video: {
104
+ context: 'outstream'
105
+ }
106
+ };
107
+ bidRequest.params = {
108
+ placementId: '100000',
109
+ video: {
110
+ playerSize: [
111
+ [640, 360]
112
+ ]
113
+ }
114
+ };
115
+ expect(spec.isBidRequestValid(bidRequest)).to.equal(true);
116
+ });
117
+
118
+ it('should return even true when the playerSize is Array[Number, Number] by video', function () {
119
+ bidRequest.mediaTypes = {
120
+ video: {
121
+ context: 'outstream',
122
+ playerSize: [640, 360]
123
+ }
124
+ };
125
+ expect(spec.isBidRequestValid(bidRequest)).to.equal(true);
126
+ });
127
+
101
128
  it('should return true when the required params are passed by banner', function () {
102
129
  setUAMobile();
103
130
  bidRequest.mediaTypes = {
@@ -223,6 +223,7 @@ describe('Seedtag Adapter', function () {
223
223
  });
224
224
 
225
225
  it('Common data request should be correct', function () {
226
+ const now = Date.now();
226
227
  const request = spec.buildRequests(validBidRequests, bidderRequest);
227
228
  const data = JSON.parse(request.data);
228
229
  expect(data.url).to.equal('referer');
@@ -231,6 +232,9 @@ describe('Seedtag Adapter', function () {
231
232
  expect(
232
233
  ['fixed', 'mobile', 'unknown'].indexOf(data.connectionType)
233
234
  ).to.be.above(-1);
235
+ expect(data.auctionStart).to.be.greaterThanOrEqual(now);
236
+ expect(data.ttfb).to.be.greaterThanOrEqual(0);
237
+
234
238
  expect(data.bidRequests[0].adUnitCode).to.equal('adunit-code');
235
239
  });
236
240
 
@@ -288,6 +292,31 @@ describe('Seedtag Adapter', function () {
288
292
  it('should expose gvlid', function () {
289
293
  expect(spec.gvlid).to.equal(157);
290
294
  });
295
+ it('should handle uspConsent', function () {
296
+ const uspConsent = '1---';
297
+
298
+ bidderRequest['uspConsent'] = uspConsent;
299
+
300
+ const request = spec.buildRequests(validBidRequests, bidderRequest);
301
+ const payload = JSON.parse(request.data);
302
+
303
+ expect(payload.uspConsent).to.exist;
304
+ expect(payload.uspConsent).to.equal(uspConsent);
305
+ });
306
+
307
+ it("shouldn't send uspConsent when not available", function () {
308
+ const uspConsent = undefined;
309
+
310
+ bidderRequest['uspConsent'] = uspConsent;
311
+
312
+ const request = spec.buildRequests(
313
+ validBidRequests,
314
+ bidderRequest
315
+ );
316
+ const payload = JSON.parse(request.data);
317
+
318
+ expect(payload.uspConsent).to.not.exist;
319
+ });
291
320
  });
292
321
  });
293
322
 
@@ -601,11 +601,11 @@ describe('sharethrough adapter spec', function () {
601
601
  const serverResponses = [{ body: { cookieSyncUrls: cookieSyncs } }];
602
602
 
603
603
  it('returns an array of correctly formatted user syncs', function () {
604
- const syncArray = spec.getUserSyncs({ pixelEnabled: true }, serverResponses, null, 'fake-privacy-signal');
604
+ const syncArray = spec.getUserSyncs({ pixelEnabled: true }, serverResponses);
605
605
  expect(syncArray).to.deep.equal([
606
- { type: 'image', url: 'cookieUrl1&us_privacy=fake-privacy-signal' },
607
- { type: 'image', url: 'cookieUrl2&us_privacy=fake-privacy-signal' },
608
- { type: 'image', url: 'cookieUrl3&us_privacy=fake-privacy-signal' }],
606
+ { type: 'image', url: 'cookieUrl1' },
607
+ { type: 'image', url: 'cookieUrl2' },
608
+ { type: 'image', url: 'cookieUrl3' }],
609
609
  );
610
610
  });
611
611