We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 94f8e33 commit 0178179Copy full SHA for 0178179
test/mocks/window.mock.js
@@ -1,13 +1,12 @@
1
const sinon = require("sinon"),
2
{ KuzzleEventEmitter } = require("../../src/core/KuzzleEventEmitter");
3
-const { getBrowserWindow } = require("../../src/utils/browser");
4
5
// A class to mock the global window object
6
class WindowMock extends KuzzleEventEmitter {
7
constructor() {
8
super();
9
10
- if (typeof getBrowserWindow() !== "undefined") {
+ if (typeof window !== "undefined") {
11
throw new Error(
12
'Cannot mock add a global "window" object: already defined'
13
);
0 commit comments