docs(svelte-testing-library): add Svelte 5 setup instructions for Jest #1401
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Companion docs PR to testing-library/svelte-testing-library#375 and svelteness/svelte-jester#283. Svelte 5 introduces the concept of "Svelte modules," which are plain JS and TS files that are run through the Svelte compiler to add support for Svelte 5's "runes" reactivity system.
This is handled well in Vitest by Svelte's first-party
vite-plugin-svelte
, but requires additional setup to work in Jest.This PR add newly required Svelte 5 setup instructions for Jest and notes that
svelte-jester >= 5
is now required. I'm going to keep this listed as a draft until I've merged and verified testing-library/svelte-testing-library#375 in some real-life projects. That being said, these additionaljest.config.js
changes will not cause any issues with existing Svelte 4 projects