Skip to content

Commit

Permalink
LiveConnect Bid Adapter : add prebid version to liveConnect (#10920)
Browse files Browse the repository at this point in the history
* forward trackerVersion

* refactoring

* adjust test

* use a proper lc version

* adjust test

* refactoring

* test case

* lint

* package-lock

* fix test

* fix test
  • Loading branch information
wi101 authored Jan 11, 2024
1 parent 1c5d925 commit c3401f9
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 8 deletions.
1 change: 1 addition & 0 deletions modules/liveIntentIdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ function initializeLiveConnect(configParams) {
}

liveConnectConfig.wrapperName = 'prebid';
liveConnectConfig.trackerVersion = '$prebid.version$';
liveConnectConfig.identityResolutionConfig = identityResolutionConfig;
liveConnectConfig.identifiersToResolve = configParams.identifiersToResolve || [];
liveConnectConfig.fireEventDelay = configParams.fireEventDelay;
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
"express": "^4.15.4",
"fun-hooks": "^0.9.9",
"just-clone": "^1.0.2",
"live-connect-js": "^6.3.2"
"live-connect-js": "^6.3.4"
},
"optionalDependencies": {
"fsevents": "^2.3.2"
Expand Down
10 changes: 10 additions & 0 deletions test/spec/modules/liveIntentIdSystem_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,16 @@ describe('LiveIntentId', function() {
}, 200);
});

it('should initialize LiveConnect and forward the prebid version when decode and emit an event', function(done) {
liveIntentIdSubmodule.decode({}, { params: {
...defaultConfigParams
}});
setTimeout(() => {
expect(server.requests[0].url).to.contain('tv=$prebid.version$')
done();
}, 200);
});

it('should initialize LiveConnect with the config params when decode and emit an event', function (done) {
liveIntentIdSubmodule.decode({}, { params: {
...defaultConfigParams.params,
Expand Down

0 comments on commit c3401f9

Please sign in to comment.