svelte-jest
Jest Svelte component transformer.
Usage
Install it via npm:
$ npm install -D svelte-jest
Add Jest configuration:
"jest": "transform": "\\.js$": "babel-jest" "\\.svelte$": "svelte-jest" "moduleFileExtensions": "js" "json" "svelte"
Then you import your Svelte component in your test code:
License
MIT