mirror of
https://github.com/videojs/video.js.git
synced 2025-02-04 11:43:27 +02:00
stub/restore window.console properly (#3861)
This commit is contained in:
parent
83cbeec424
commit
98b80df0d0
@ -178,6 +178,8 @@ QUnit.test('Plugins should not get events after stopImmediatePropagation is call
|
||||
|
||||
QUnit.test('Plugin that does not exist logs an error', function(assert) {
|
||||
|
||||
const origConsole = window.console;
|
||||
|
||||
// stub the global log functions
|
||||
const console = window.console = {
|
||||
log() {},
|
||||
@ -186,7 +188,6 @@ QUnit.test('Plugin that does not exist logs an error', function(assert) {
|
||||
};
|
||||
const log = sinon.stub(console, 'log');
|
||||
const error = sinon.stub(console, 'error');
|
||||
const origConsole = window.console;
|
||||
|
||||
// enable a non-existing plugin
|
||||
TestHelpers.makePlayer({
|
||||
|
Loading…
x
Reference in New Issue
Block a user