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): update vitest and jest setup instructions #1360

Merged
merged 2 commits into from
Feb 1, 2024

Conversation

mcous
Copy link
Contributor

@mcous mcous commented Jan 29, 2024

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

Copy link

netlify bot commented Jan 29, 2024

Deploy Preview for testing-library ready!

Name Link
🔨 Latest commit eede65d
🔍 Latest deploy log https://app.netlify.com/sites/testing-library/deploys/65b95b4a90ddd60008525546
😎 Deploy Preview https://deploy-preview-1360--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.

Comment on lines 40 to 41
2. Add a `vitest-setup.js` file to configure cleanup and
[`@testing-library/jest-dom`][@testing-library/jest-dom], if using.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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

Copy link
Contributor

@yanick yanick left a 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! 👍

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.

LGTM 👍

@yanick can you let us know if these changes are good for you?

@yanick
Copy link
Contributor

yanick commented Feb 1, 2024

@yanick can you let us know if these changes are good for you?

@timdeschryver Looks good! 👍

@timdeschryver timdeschryver merged commit 01bb6d3 into testing-library:main Feb 1, 2024
4 checks passed
@timdeschryver
Copy link
Member

@all-contributors please add @mcous for docs, review

Copy link
Contributor

@timdeschryver

I've put up a pull request to add @mcous! 🎉

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