Skip to content

Commit 12d8c11

Browse files
committed
docs(svelte): recommend better transformer
1 parent 3dc3df2 commit 12d8c11

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

docs/svelte-testing-library/setup.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ with any testing framework and runner you're comfortable with.
2828
2929
3. You'll need to compile the Svelte components before using them in Jest, so
3030
we need to install
31-
[jest-transform-svelte](https://github.com/rspieker/jest-transform-svelte)
31+
[svelte-jester](https://github.com/mihar-22/svelte-jester)
3232
3333
```
34-
npm install --save-dev jest-transform-svelte
34+
npm install --save-dev svelte-jester
3535
```
3636
3737
4. Add the following Jest configuration to your `package.json`
@@ -40,7 +40,7 @@ with any testing framework and runner you're comfortable with.
4040
{
4141
"jest": {
4242
"transform": {
43-
"^.+\\.svelte$": "jest-transform-svelte"
43+
"^.+\\.svelte$": "svelte-jester"
4444
},
4545
"moduleFileExtensions": ["js", "svelte"]
4646
}
@@ -71,3 +71,10 @@ with any testing framework and runner you're comfortable with.
7171
```
7272
npm run test
7373
```
74+
75+
## Babel / Preprocessors
76+
77+
If you'd like to also include [Babel](https://babeljs.io/) or any
78+
[Svelte preprocessors](https://github.com/kaisermann/svelte-preprocess) then
79+
simply follow the instructions over at
80+
[svelte-jester](https://github.com/mihar-22/svelte-jester#babel).

0 commit comments

Comments
 (0)