-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: cleanup test warnings #4752
Conversation
src/js/video.js
Outdated
// Element may have a player attr referring to an already created player instance. | ||
// If so return that otherwise set up a new player below | ||
if (tag.player || Player.players[tag.playerId]) { | ||
return tag.player || Player.players[tag.playerId]; | ||
} | ||
|
||
// Check if element is included in the DOM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this change would make this be fix
rather than a test
src/js/video.js
Outdated
// Element may have a player attr referring to an already created player instance. | ||
// If so return that otherwise set up a new player below | ||
if (tag.player || Player.players[tag.playerId]) { | ||
return tag.player || Player.players[tag.playerId]; | ||
} | ||
|
||
// Check if element is included in the DOM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we have this be a separate PR from the test changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah sure
test/unit/player.test.js
Outdated
}, 'a falsey techOrder should throw'); | ||
|
||
videojs.options.techOrder = techOrder; | ||
|
||
while (fixture.firstChild) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to do this. qunit should be taking care to empty out qunit-fixture element after a test is run.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point
See #4755 for the other PR |
Description
Currently we get logs in the tests due to a recent change. This PR fixes that. It also fixes a case were we would log that the dom element isn't in the dom, when it really is:
Here is an example (taken from the test that showed me it)