You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@
7
7
### Fixes
8
8
9
9
-`[jest-runtime]``require.main` is no longer `undefined` when using `jest.resetModules` ([#10626](https://github.com/facebook/jest/pull/10626))
10
-
-`[jest-runtime]` Do not inject `global` variable into module wrapper ([#10644](https://github.com/facebook/jest/pull/10644))
10
+
-`[jest-runtime]`[**BREAKING**]Do not inject `global` variable into module wrapper ([#10644](https://github.com/facebook/jest/pull/10644))
11
11
-`[@jest/types]` Add missing values for `timers` ([#10632](https://github.com/facebook/jest/pull/10632))
Copy file name to clipboardExpand all lines: packages/jest-environment-jsdom/src/index.ts
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -45,6 +45,9 @@ class JSDOMEnvironment implements JestEnvironment {
45
45
thrownewError('JSDOM did not return a Window object');
46
46
}
47
47
48
+
// for "universal" code (code should use `globalThis`)
49
+
global.global=global;
50
+
48
51
// In the `jsdom@16`, ArrayBuffer was not added to Window, ref: https://github.com/jsdom/jsdom/commit/3a4fd6258e6b13e9cf8341ddba60a06b9b5c7b5b
49
52
// Install ArrayBuffer to Window to fix it. Make sure the test is passed, ref: https://github.com/facebook/jest/pull/7626
0 commit comments