Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
m.sorochuk committed Jan 4, 2018
1 parent 11f20fa commit 5d427d4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions modules/vertamediaBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,11 @@ function createBid(mediaType, bidResponse) {
return bid;
}

/**
* Create Vertamedia renderer
* @param requestId
* @returns {*}
*/
function newRenderer(requestId) {
const renderer = Renderer.install({
id: requestId,
Expand All @@ -158,6 +163,10 @@ function newRenderer(requestId) {
return renderer;
}

/**
* Initialise Vertamedia outstream
* @param bid
*/
function outstreamRender(bid) {
bid.renderer.push(() => {
window.VOutstreamAPI.initOutstreams([{
Expand Down
2 changes: 2 additions & 0 deletions test/spec/modules/vertamediaBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ describe('vertamediaBidAdapter', () => {
expect(videoRequest[0].method).to.equal('GET');
expect(displayRequest[0].method).to.equal('GET');
});

it('sends bid request to correct ENDPOINT', () => {
expect(videoRequest[0].url).to.equal(ENDPOINT);
expect(displayRequest[0].url).to.equal(ENDPOINT);
Expand Down Expand Up @@ -193,6 +194,7 @@ describe('vertamediaBidAdapter', () => {

function bidServerResponseCheck() {
const result = spec.interpretResponse({body: serverResponse}, {bidderRequest});

expect(result).to.deep.equal(eqResponse);
}

Expand Down

0 comments on commit 5d427d4

Please sign in to comment.