Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make jsdom accessible to extending environments #12232

Merged
merged 2 commits into from Feb 10, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -19,6 +19,7 @@

- `[expect]` Move typings of `.not`, `.rejects` and `.resolves` modifiers outside of `Matchers` interface ([#12346](https://github.com/facebook/jest/pull/12346))
- `[jest-phabricator]` [**BREAKING**] Convert to ESM ([#12341](https://github.com/facebook/jest/pull/12341))
- `[jest-environment-jsdom]` Make `jsdom` accessible to extending environments again ([#12232](https://github.com/facebook/jest/pull/12232))

### Chore & Maintenance

Expand Down
4 changes: 2 additions & 2 deletions packages/jest-environment-jsdom/package.json
Expand Up @@ -20,14 +20,14 @@
"@jest/environment": "^27.5.1",
"@jest/fake-timers": "^27.5.1",
"@jest/types": "^27.5.1",
"@types/jsdom": "^16.2.4",
"@types/node": "*",
"jest-mock": "^27.5.1",
"jest-util": "^27.5.1",
"jsdom": "^19.0.0"
},
"devDependencies": {
"@jest/test-utils": "^27.5.1",
"@types/jsdom": "^16.2.4"
"@jest/test-utils": "^27.5.1"
},
"engines": {
"node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-environment-jsdom/src/index.ts
Expand Up @@ -23,7 +23,7 @@ type Win = Window &
};

export default class JSDOMEnvironment implements JestEnvironment<number> {
private dom: JSDOM | null;
dom: JSDOM | null;
fakeTimers: LegacyFakeTimers<number> | null;
fakeTimersModern: ModernFakeTimers | null;
global: Win;
Expand Down