Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
return originalAddListener.apply(this, args)
}
global.removeEventListener = function(...args) {
if (args[0] === 'error') {
userErrorListenerCount--
}
return originalRemoveListener.apply(this, args)
}
/* eslint-enable @typescript-eslint/unbound-method */
this.moduleMocker = new ModuleMocker(global)
const timerConfig = {
idToRef: id => id,
refToId: ref => ref,
}
this.fakeTimers = new JestFakeTimers({
config,
global,
moduleMocker: this.moduleMocker,
timerConfig,
})
this.global.jsdom = this.dom
}
setup() {