Skip to content

Commit

Permalink
[test] setProgress trackOnce : chekc that trackOnce false is trasmite…
Browse files Browse the repository at this point in the history
…d in the track() call.
rs-guian committed Oct 17, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 09655cb commit a3c1690
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
@@ -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 = [];

0 comments on commit a3c1690

Please sign in to comment.