File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
docs/svelte-testing-library Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -72,9 +72,30 @@ with any testing framework and runner you're comfortable with.
7272 npm run test
7373 ```
7474
75+ ## Typescript
76+
77+ In order to support Typescript, you need to enable `preprocess`.
78+
79+ 1. Update your jest configuration
80+
81+ ```json
82+ {
83+ "jest": {
84+ "transform": {
85+ "^.+\\.svelte$": ["svelte-jester", { "preprocess": true }]
86+ },
87+ "moduleFileExtensions": ["js", "ts", "svelte"]
88+ }
89+ }
90+ ```
91+
7592## Babel / Preprocessors
7693
7794If you'd like to also include [ Babel] ( https://babeljs.io/ ) or any
7895[ Svelte preprocessors] ( https://github.com/kaisermann/svelte-preprocess ) then
7996simply follow the instructions over at
8097[ svelte-jester] ( https://github.com/mihar-22/svelte-jester#babel ) .
98+
99+ ```
100+
101+ ```
You can’t perform that action at this time.
0 commit comments