Skip to content

Commit e7a07b4

Browse files
authored
Update setup.mdx (testing-library#1058)
Added instruction on jsdom setup as it now isn't shipped with jest as of v28. https://jestjs.io/docs/upgrading-to-jest28#jsdom "If you are using JSDOM test environment, jest-environment-jsdom package now must be installed separately"
1 parent 1c6287a commit e7a07b4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/svelte-testing-library/setup.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ with any testing framework and runner you're comfortable with.
99

1010
## Jest
1111

12-
1. Install Jest
12+
1. Install Jest & jest-environment-jsdom
1313

1414
```
15-
npm install --save-dev jest
15+
npm install --save-dev jest jest-environment-jsdom
1616
```
1717

1818
2. Add the following to your `package.json`
@@ -42,7 +42,8 @@ with any testing framework and runner you're comfortable with.
4242
"transform": {
4343
"^.+\\.svelte$": "svelte-jester"
4444
},
45-
"moduleFileExtensions": ["js", "svelte"]
45+
"moduleFileExtensions": ["js", "svelte"],
46+
"testEnvironment": "jsdom"
4647
}
4748
}
4849
```

0 commit comments

Comments
 (0)