diff --git a/packages/jest-environment-jsdom/src/index.ts b/packages/jest-environment-jsdom/src/index.ts index 5973678a40f8..f71f350becc8 100644 --- a/packages/jest-environment-jsdom/src/index.ts +++ b/packages/jest-environment-jsdom/src/index.ts @@ -66,8 +66,7 @@ export default class JSDOMEnvironment implements JestEnvironment { ...projectConfig.testEnvironmentOptions, }, ); - const global = (this.global = this.dom.window.document - .defaultView as unknown as Win); + const global = (this.global = this.dom.window as unknown as Win); if (global == null) { throw new Error('JSDOM did not return a Window object');