mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-06 03:50:04 +02:00
Moving to node_modules folder to make easier to upgrade
trying to move from Bootstrap 3 to Bootstrap 5
This commit is contained in:
parent
047e363a16
commit
d4d042e041
8460 changed files with 1355889 additions and 547977 deletions
39
node_modules/videojs-contrib-ads/test/unit/states/test.AdsDone.js
generated
vendored
Normal file
39
node_modules/videojs-contrib-ads/test/unit/states/test.AdsDone.js
generated
vendored
Normal file
|
@ -0,0 +1,39 @@
|
|||
import QUnit from 'qunit';
|
||||
import sinon from 'sinon';
|
||||
import AdsDone from '../../../src/states/AdsDone.js';
|
||||
|
||||
/*
|
||||
* These tests are intended to be isolated unit tests for one state with all
|
||||
* other modules mocked.
|
||||
*/
|
||||
QUnit.module('AdsDone', {
|
||||
beforeEach() {
|
||||
this.events = [];
|
||||
this.player = {
|
||||
trigger: (event) => {
|
||||
this.events.push(event);
|
||||
},
|
||||
ads: {}
|
||||
};
|
||||
|
||||
this.adsDone = new AdsDone(this.player);
|
||||
}
|
||||
});
|
||||
|
||||
QUnit.test('sets _contentHasEnded on init', function(assert) {
|
||||
this.adsDone.init(this.player);
|
||||
assert.equal(this.player.ads._contentHasEnded, true, 'content has ended');
|
||||
});
|
||||
|
||||
QUnit.test('ended event on init', function(assert) {
|
||||
this.adsDone.init(this.player);
|
||||
assert.equal(this.events[0], 'ended', 'content has ended');
|
||||
});
|
||||
|
||||
QUnit.test('does not play midrolls', function(assert) {
|
||||
this.adsDone.transitionTo = sinon.spy();
|
||||
|
||||
this.adsDone.init(this.player);
|
||||
this.adsDone.startLinearAdMode();
|
||||
assert.equal(this.adsDone.transitionTo.callCount, 0, 'no transition');
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue