Skip to content

Commit

Permalink
test: clean up test warnings (#4752)
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonocasey authored and gkatsev committed Nov 16, 2017
1 parent 26b0d2c commit 3aae4b2
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion test/unit/player.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1107,10 +1107,15 @@ QUnit.test('play promise should resolve to native value if returned', function(a

QUnit.test('should throw on startup no techs are specified', function(assert) {
const techOrder = videojs.options.techOrder;
const fixture = document.getElementById('qunit-fixture');

videojs.options.techOrder = null;
assert.throws(function() {
videojs(TestHelpers.makeTag());
const tag = TestHelpers.makeTag();

fixture.appendChild(tag);

videojs(tag);
}, 'a falsey techOrder should throw');

videojs.options.techOrder = techOrder;
Expand Down Expand Up @@ -1428,6 +1433,10 @@ QUnit.test('should allow to register custom player when any player has not been
videojs.registerComponent('Player', CustomPlayer);

const tag = TestHelpers.makeTag();
const fixture = document.getElementById('qunit-fixture');

fixture.appendChild(tag);

const player = videojs(tag);

assert.equal(player instanceof CustomPlayer, true, 'player is custom');
Expand All @@ -1439,6 +1448,10 @@ QUnit.test('should allow to register custom player when any player has not been

QUnit.test('should not allow to register custom player when any player has been created', function(assert) {
const tag = TestHelpers.makeTag();
const fixture = document.getElementById('qunit-fixture');

fixture.appendChild(tag);

const player = videojs(tag);

class CustomPlayer extends Player {}
Expand Down Expand Up @@ -1471,6 +1484,10 @@ QUnit.test('techGet runs through middleware if allowedGetter', function(assert)
}));

const tag = TestHelpers.makeTag();
const fixture = document.getElementById('qunit-fixture');

fixture.appendChild(tag);

const player = videojs(tag, {
techOrder: ['techFaker']
});
Expand Down Expand Up @@ -1504,6 +1521,10 @@ QUnit.test('techCall runs through middleware if allowedSetter', function(assert)
}));

const tag = TestHelpers.makeTag();
const fixture = document.getElementById('qunit-fixture');

fixture.appendChild(tag);

const player = videojs(tag, {
techOrder: ['techFaker']
});
Expand Down Expand Up @@ -1560,7 +1581,11 @@ QUnit.test('src selects tech based on middleware', function(assert) {
}
}));

const fixture = document.getElementById('qunit-fixture');
const tag = TestHelpers.makeTag();

fixture.appendChild(tag);

const player = videojs(tag, {
techOrder: ['fooTech', 'barTech']
});
Expand Down

0 comments on commit 3aae4b2

Please sign in to comment.