File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
docs/svelte-testing-library Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -28,10 +28,10 @@ with any testing framework and runner you're comfortable with.
28
28
29
29
3. You'll need to compile the Svelte components before using them in Jest, so
30
30
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 )
32
32
33
33
```
34
- npm install --save-dev jest-transform- svelte
34
+ npm install --save-dev svelte-jester
35
35
```
36
36
37
37
4. Add the following Jest configuration to your `package.json`
@@ -40,7 +40,7 @@ with any testing framework and runner you're comfortable with.
40
40
{
41
41
"jest": {
42
42
"transform": {
43
- "^.+\\.svelte$": "jest-transform- svelte"
43
+ "^.+\\.svelte$": "svelte-jester "
44
44
},
45
45
"moduleFileExtensions": ["js", "svelte"]
46
46
}
@@ -71,3 +71,10 @@ with any testing framework and runner you're comfortable with.
71
71
```
72
72
npm run test
73
73
```
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).
You can’t perform that action at this time.
0 commit comments