Skip to content

Commit

Permalink
add unit test on setProgress trackOnce : chekc that trackOnce false i…
Browse files Browse the repository at this point in the history
…s trasmited in the track() call.
  • Loading branch information
rs-guian committed Oct 17, 2023
1 parent 09655cb commit 79a225d
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/vast_tracker.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,25 @@ describe('VASTTracker', function () {
});
});

describe('#setProgress trackOnce', () => {

after(()=> {
this.stub?.restore();
})

it('should send firstQuartile event with trackOnce : false', () => {
this.stub = sinon.stub(this.Tracker, 'track').callsFake((eventName, params) => {
console.log("testprogress : "+eventName);
if(eventName === 'progress-23') {
params.once.should.equal(false);

}
});

this.Tracker.setProgress(23, null, false);
});
});

describe('#setMuted', () => {
before((done) => {
_eventsSent = [];
Expand Down

0 comments on commit 79a225d

Please sign in to comment.