• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

prebid / Prebid.js / 19437775255

17 Nov 2025 05:00PM UTC coverage: 96.213% (-0.02%) from 96.231%
19437775255

push

github

web-flow
sevioBidAdapter_bugfix: Send all sizes instead of just maxSize (#14133)

* Send all sizes instead of just maxSize

* Added tests to cover modifs in the sizes that we are sending

53222 of 65234 branches covered (81.59%)

10 of 10 new or added lines in 2 files covered. (100.0%)

304 existing lines in 58 files now uncovered.

202715 of 210693 relevant lines covered (96.21%)

71.77 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

86.36
/modules/fpdModule/index.js
1
/**
8✔
2
 * This module sets default values and validates ortb2 first part data
3
 * @module modules/firstPartyData
4
 */
5
import { config } from '../../src/config.js';
6
import { module, getHook } from '../../src/hook.js';
7
import {logError} from '../../src/utils.js';
8
import {PbPromise} from '../../src/utils/promise.js';
9
import {timedAuctionHook} from '../../src/utils/perfMetrics.js';
10

11
const submodules = [];
8✔
12

13
export function registerSubmodules(submodule) {
14
  submodules.push(submodule);
4✔
15
}
16

17
export function reset() {
18
  submodules.length = 0;
3✔
19
}
20

21
export function processFpd({global = {}, bidder = {}} = {}) {
81!
22
  const modConf = config.getConfig('firstPartyData') || {};
81✔
23
  let result = PbPromise.resolve({global, bidder});
81✔
24
  submodules.sort((a, b) => {
81✔
UNCOV
25
    return ((a.queue || 1) - (b.queue || 1));
×
26
  }).forEach(submodule => {
27
    result = result.then(
2✔
28
      ({global, bidder}) => PbPromise.resolve(submodule.processFpd(modConf, {global, bidder}))
2✔
29
        .catch((err) => {
30
          logError(`Error in FPD module ${submodule.name}`, err);
×
31
          return {};
×
32
        })
33
        .then((result) => ({global: result.global || global, bidder: result.bidder || bidder}))
2!
34
    );
35
  });
36
  return result;
81✔
37
}
38

39
export const startAuctionHook = timedAuctionHook('fpd', function startAuctionHook(fn, req) {
8✔
40
  processFpd(req.ortb2Fragments).then((ortb2Fragments) => {
81✔
41
    Object.assign(req.ortb2Fragments, ortb2Fragments);
81✔
42
    fn.call(this, req);
81✔
43
  })
44
});
45

46
function setupHook() {
47
  getHook('startAuction').before(startAuctionHook, 10);
8✔
48
}
49

50
module('firstPartyData', registerSubmodules);
8✔
51

52
// Runs setupHook on initial load
53
setupHook();
8✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc