-
Notifications
You must be signed in to change notification settings - Fork 721
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): update vitest and jest setup instructions #1360
Conversation
✅ Deploy Preview for testing-library ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
2. Add a `vitest-setup.js` file to configure cleanup and | ||
[`@testing-library/jest-dom`][@testing-library/jest-dom], if using. |
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.
2. Add a `vitest-setup.js` file to configure cleanup and | |
[`@testing-library/jest-dom`][@testing-library/jest-dom], if using. | |
2. Add a `vitest-setup.js` file to optionally set up automatic post-test cleanup and | |
[`@testing-library/jest-dom`][@testing-library/jest-dom] expect matchers. |
|
||
4.2 import `vitest-dom` at within the vitest setup file (usually | ||
`vitest-setup.(js|ts)`) | ||
4. Add test scipts to your `package.json` to run the tests with Vitest |
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.
4. Add test scipts to your `package.json` to run the tests with Vitest | |
4. Add test scripts to your `package.json` to run the tests with Vitest |
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.
Beyond my small comments, looks awesome! 👍
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.
LGTM 👍
@yanick can you let us know if these changes are good for you?
@timdeschryver Looks good! 👍 |
@all-contributors please add @mcous for docs, review |
I've put up a pull request to add @mcous! 🎉 |
Overview
Both the Vitest and Jest setup instructions for svelte-testing-library were a bit out of date. This PR updates them both.
The examples section needs updating, too, but I'll submit that as a separate PR.
Issues
cleanup
is not automatically called after each test #1331