Skip to content

Commit 72fabd1

Browse files
fix(mock-doc): get native primitive from globalThis (#6021)
1 parent 61f90b0 commit 72fabd1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/mock-doc/window.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ import { MockResizeObserver } from './resize-observer';
2525
import { MockShadowRoot } from './shadow-root';
2626
import { MockStorage } from './storage';
2727

28-
const nativeClearInterval = clearInterval;
29-
const nativeClearTimeout = clearTimeout;
30-
const nativeSetInterval = setInterval;
31-
const nativeSetTimeout = setTimeout;
32-
const nativeURL = URL;
28+
const nativeClearInterval = globalThis.clearInterval;
29+
const nativeClearTimeout = globalThis.clearTimeout;
30+
const nativeSetInterval = globalThis.setInterval;
31+
const nativeSetTimeout = globalThis.setTimeout;
32+
const nativeURL = globalThis.URL;
3333
const nativeWindow = globalThis.window;
3434

3535
export class MockWindow {

0 commit comments

Comments
 (0)