Skip to content

Commit 6b19d6d

Browse files
committed
make jsdom accessible to extending environments
1 parent ff7a751 commit 6b19d6d

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

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

2324
### Chore & Maintenance
2425

packages/jest-environment-jsdom/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@
2020
"@jest/environment": "^27.5.1",
2121
"@jest/fake-timers": "^27.5.1",
2222
"@jest/types": "^27.5.1",
23+
"@types/jsdom": "^16.2.4",
2324
"@types/node": "*",
2425
"jest-mock": "^27.5.1",
2526
"jest-util": "^27.5.1",
2627
"jsdom": "^19.0.0"
2728
},
2829
"devDependencies": {
29-
"@jest/test-utils": "^27.5.1",
30-
"@types/jsdom": "^16.2.4"
30+
"@jest/test-utils": "^27.5.1"
3131
},
3232
"engines": {
3333
"node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0"

packages/jest-environment-jsdom/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ type Win = Window &
2323
};
2424

2525
export default class JSDOMEnvironment implements JestEnvironment<number> {
26-
private dom: JSDOM | null;
26+
dom: JSDOM | null;
2727
fakeTimers: LegacyFakeTimers<number> | null;
2828
fakeTimersModern: ModernFakeTimers | null;
2929
global: Win;

0 commit comments

Comments
 (0)