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

Update Svelte Setup to reflect current preferred testing framework #1123

Merged
merged 4 commits into from
Jul 25, 2022

Conversation

bertybot
Copy link
Contributor

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!

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.
@netlify
Copy link

netlify bot commented Jul 22, 2022

Deploy Preview for testing-library ready!

Name Link
🔨 Latest commit a76da73
🔍 Latest deploy log https://app.netlify.com/sites/testing-library/deploys/62de954a9019270008735511
😎 Deploy Preview https://deploy-preview-1123--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 settings.

Copy link
Member

@timdeschryver timdeschryver left a 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.

docs/svelte-testing-library/setup.mdx Outdated Show resolved Hide resolved
docs/svelte-testing-library/setup.mdx Outdated Show resolved Hide resolved
bertybot and others added 2 commits July 23, 2022 08:49
Co-authored-by: Tim Deschryver <28659384+timdeschryver@users.noreply.github.com>
Co-authored-by: Tim Deschryver <28659384+timdeschryver@users.noreply.github.com>
@benmccann
Copy link
Contributor

intro.mdx would also need to be updated

@bertybot
Copy link
Contributor Author

intro.mdx would also need to be updated

Updated

@timdeschryver timdeschryver merged commit ef39495 into testing-library:main Jul 25, 2022
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

3 participants