Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

mcous
Copy link
Contributor

@mcous mcous commented Jun 16, 2024

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

Copy link

netlify bot commented Jun 16, 2024

Deploy Preview for testing-library ready!

Name Link
🔨 Latest commit 50dcf74
🔍 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
Copy link
Member

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

@mcous
Copy link
Contributor Author

mcous commented Jun 20, 2024

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 mcous marked this pull request as ready for review June 24, 2024 20:59
Copy link
Member

@MatanBobi MatanBobi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great :) Are we ready to merge this?

@mcous
Copy link
Contributor Author

mcous commented Jun 25, 2024

Good from my end, thanks for taking a look

@MatanBobi MatanBobi merged commit 29df9b5 into testing-library:main Jun 25, 2024
4 checks passed
@mcous mcous deleted the svelte-setup-jest-5 branch June 25, 2024 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants