README
Jest Transformer for Svelte 3
In order to unit test Svelte components with the Jest test framework, you need to use a transformer to ensure the Svelte component properly resolves its own component dependencies.
Installation
$ npm install --save-dev jest-transform-svelte
Svelte 2
If you are using Svelte 2, please use version 1 of jest-transform-svelte
$ npm install --save-dev jest-transform-svelte@1
Usage
Simply add the component to the Jest transform configuration
transform: {
...
'^.+\\.svelte