svelte-jest-example

Svelte Jest Example

A learning exercise for me to see how to test svelte components with Jest.

Svelte Jest Example

A small project to figure out the easiest way to use Jest to test Svelte components.

Dependencies

Setup

yarn

Run the tests

yarn test

svelte-jest

Svelte jest is basically just a very smaller wrapper around the svelte compile functionality that ties it to the Jest process API.

The Svelte compiler is listed as a peer dependency, so you must install your own version of it.

Top categories

Loading Svelte Themes