-
Notifications
You must be signed in to change notification settings - Fork 693
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
Update Svelte Setup to reflect current preferred testing framework #1123
Conversation
Updated Svelte setup to reflect current recommended practices. - Set Vitest as preferred framework - Added Sveltekit plugin information - Reorganize Jest to bottom and put Typescript and preprocessor sections as subheadings since they are jest specific.
✅ Deploy Preview for testing-library ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As for the Jest Section I moved it to the bottom and I set the Typescript and preprocess sections as subsections since those are Jest specific. I was wondering if I should add sections like those to the Vitest section? The svelte-vite-plugin simply just reads your svelte.config. So if you were already building the project in TS or using preprocessors you don't need to do anything. So idk if it is worth mentioning. Let me know.
I don't think it's worth mentioning. As you said, most of it will be handled already. If you want to do more advanced things with it, that information will be found on the Vitest (or plugins) documentation. Adding it here as well will be harder to keep it up to date.
We can always add it later when there's a need for it.
Co-authored-by: Tim Deschryver <28659384+timdeschryver@users.noreply.github.com>
Co-authored-by: Tim Deschryver <28659384+timdeschryver@users.noreply.github.com>
|
Updated |
After my last update I talked with some of the guys on the Svelte discord and its pretty well accepted that Vitest is the preferred unit testing framework for Svelte. Please refer to the comment from @benmccann at the bottom of this issue
So I updated the Setup docs to put Vitest as the preferred. I also added a section for the Sveltekit plugin for people using Sveltekit.
As for the Jest Section I moved it to the bottom and I set the Typescript and preprocess sections as subsections since those are Jest specific. I was wondering if I should add sections like those to the Vitest section? The svelte-vite-plugin simply just reads your svelte.config. So if you were already building the project in TS or using preprocessors you don't need to do anything. So idk if it is worth mentioning. Let me know.
Thanks Dudes!