Skip to content

Commit

Permalink
fix: make jsdom accessible to extending environments (#12232)
Browse files Browse the repository at this point in the history
  • Loading branch information
robin-drexler committed Feb 10, 2022
1 parent 65f9487 commit 0d0844a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -18,6 +18,7 @@
### Fixes

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

### 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

0 comments on commit 0d0844a

Please sign in to comment.