mirror of
https://github.com/videojs/video.js.git
synced 2025-03-29 22:07:10 +02:00
test(events): silence error logging in tests (#3835)
The error that is logged in this test makes it hard to see what is an actual error in some cases.
This commit is contained in:
parent
5ec46b0372
commit
214e01c885
@ -1,6 +1,7 @@
|
||||
/* eslint-env qunit */
|
||||
import * as Events from '../../src/js/utils/events.js';
|
||||
import document from 'global/document';
|
||||
import log from '../../src/js/utils/log.js';
|
||||
|
||||
QUnit.module('Events');
|
||||
|
||||
@ -263,6 +264,10 @@ QUnit.test('should have relatedTarget correctly set on the event', function(asse
|
||||
QUnit.test('should execute remaining handlers after an exception in an event handler', function(assert) {
|
||||
assert.expect(1);
|
||||
|
||||
const oldLogError = log.error;
|
||||
|
||||
log.error = function() {};
|
||||
|
||||
const el = document.createElement('div');
|
||||
const listener1 = function() {
|
||||
throw new Error('GURU MEDITATION ERROR');
|
||||
@ -276,4 +281,6 @@ QUnit.test('should execute remaining handlers after an exception in an event han
|
||||
|
||||
// 1 click
|
||||
Events.trigger(el, 'click');
|
||||
|
||||
log.error = oldLogError;
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user