testing-library / testing-library-docs

docs site for @testing-library/*
https://testing-library.com
MIT License
451 stars 701 forks source link

docs(svelte-testing-library): add Svelte 5 setup instructions for Jest #1401

Closed mcous closed 2 months ago

mcous commented 2 months ago

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 additional jest.config.js changes will not cause any issues with existing Svelte 4 projects

netlify[bot] commented 2 months ago

Deploy Preview for testing-library ready!

Name Link
Latest commit 50dcf74fb6db708913a993c780d90214f2c834f0
Latest deploy log https://app.netlify.com/sites/testing-library/deploys/666f35153c5e9b0009567af5
Deploy Preview https://deploy-preview-1401--testing-library.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

MatanBobi commented 2 months ago

Hi @mcous :) I see that you've merged the PR you've referred to. Is this ready to be reviewed?

mcous commented 2 months ago

Thanks for checking in @MatanBobi! I've pushed that PR on a prerelease tag while I continue with some smoke testing. Barring any unforeseen problems, I think this should be ready to review for real on Monday. Definitely feel free to take a look in the mean time!

mcous commented 2 months ago

Good from my end, thanks for taking a look