diff --git a/docs/svelte-testing-library/setup.md b/docs/svelte-testing-library/setup.md index 02bf0e418..65a248495 100644 --- a/docs/svelte-testing-library/setup.md +++ b/docs/svelte-testing-library/setup.md @@ -72,6 +72,23 @@ with any testing framework and runner you're comfortable with. npm run test ``` +## Typescript + +In order to support Typescript, you need to enable `preprocess`. + +1. Update your jest configuration + + ```json + { + "jest": { + "transform": { + "^.+\\.svelte$": ["svelte-jester", { "preprocess": true }] + }, + "moduleFileExtensions": ["js", "ts", "svelte"] + } + } + ``` + ## Babel / Preprocessors If you'd like to also include [Babel](https://babeljs.io/) or any