Skip to content

Commit 9a0b6fc

Browse files
committed
do not override Dom methods
1 parent 90f3629 commit 9a0b6fc

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

test/unit/video.test.js

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -227,13 +227,6 @@ QUnit.test('should expose options and players properties for backward-compatibil
227227
});
228228

229229
QUnit.test('should expose DOM functions', function(assert) {
230-
const origWarnLog = log.warn;
231-
const warnLogs = [];
232-
233-
log.warn = (args) => {
234-
warnLogs.push(args);
235-
};
236-
237230
const methods = [
238231
'isEl',
239232
'isTextNode',
@@ -252,24 +245,7 @@ QUnit.test('should expose DOM functions', function(assert) {
252245
methods.forEach(name => {
253246
assert.strictEqual(typeof videojs[name], 'function', `function videojs.${name}`);
254247
assert.strictEqual(typeof Dom[name], 'function', `Dom.${name} function exists`);
255-
256-
const oldMethod = Dom[name];
257-
let domCalls = 0;
258-
259-
Dom[name] = () => domCalls++;
260-
261-
videojs[name]();
262-
263-
assert.equal(domCalls, 1, `Dom.${name} was called when videojs.${name} is run.`);
264-
assert.equal(warnLogs.length, 1, `videojs.${name} logs a deprecation warning`);
265-
266-
// reset
267-
warnLogs.length = 0;
268-
Dom[name] = oldMethod;
269248
});
270-
271-
// reset log
272-
log.warn = origWarnLog;
273249
});
274250

275251
QUnit.test('ingest player div if data-vjs-player attribute is present on video parentNode', function(assert) {

0 commit comments

Comments
 (0)