Skip to content

Commit

Permalink
PUBA-5273: updated adapter definition
Browse files Browse the repository at this point in the history
  • Loading branch information
Hassija committed Nov 15, 2019
1 parent 96a5594 commit 13feed0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
8 changes: 1 addition & 7 deletions modules/invisiblyAnalyticsAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@ let invisiblyAdapter = Object.assign(
track({ eventType, args }) {
handleEvent(eventType, args);
},
sendEvent({ event }) {
sendEvent(event);
}
sendEvent
}
);

Expand Down Expand Up @@ -165,7 +163,6 @@ function handleEvent(eventType, eventArgs) {
}
case BID_RESPONSE: {
invisiblyEvent = eventArgs;
delete invisiblyEvent.ad;
break;
}
case NO_BID: {
Expand All @@ -174,8 +171,6 @@ function handleEvent(eventType, eventArgs) {
}
case BID_WON: {
invisiblyEvent = eventArgs;
delete invisiblyEvent.ad;
delete invisiblyEvent.adUrl;
break;
}
case BIDDER_DONE: {
Expand All @@ -199,7 +194,6 @@ function handleEvent(eventType, eventArgs) {
break;
}
default:
console.log('invalid event, not fired');
return;
}
invisiblyEvent.eventType = eventType;
Expand Down
1 change: 1 addition & 0 deletions test/spec/modules/invisiblyAnalyticsAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ describe('Invisibly Analytics Adapter test suite', function() {
events.emit(constants.EVENTS.BID_REQUESTED, MOCK.BID_REQUESTED);
events.emit(constants.EVENTS.BID_RESPONSE, MOCK.BID_RESPONSE);
events.emit(constants.EVENTS.BID_WON, MOCK.BID_WON);
invisiblyAdapter.flush();
sinon.assert.callCount(invisiblyAdapter.track, 0);
});
// spec to test custom api endpoint
Expand Down

0 comments on commit 13feed0

Please sign in to comment.