-
-
Notifications
You must be signed in to change notification settings - Fork 617
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
test: add jest-dom matchers and eslint plugin #2808
test: add jest-dom matchers and eslint plugin #2808
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
Preview in LiveCodesLatest commit: 8dcd74f
See documentations for usage instructions. |
22dfb7c
to
1ebc37a
Compare
1ebc37a
to
50cd60e
Compare
Seems like I'm not be able to satisfy TS versions below |
Can you install an old version for old TS?
|
@@ -0,0 +1 @@ | |||
import '@testing-library/jest-dom/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.
I use the file name vitest-setup.js
elsewhere. Maybe vitest-setup.ts
here?
https://github.com/jotaijs/jotai-zustand/blob/main/tests/vitest-setup.js
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.
Oh. I was about to change that, but look like PR is merged. :)
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.
I wasn't sure if you were going to change. Feel free to send new PRs.
50cd60e
to
fe6f32f
Compare
fe6f32f
to
4eee6fb
Compare
4eee6fb
to
5fb0342
Compare
5fb0342
to
53e3c68
Compare
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
Summary
Testing Library provides nice set of custom matchers that are more declarative and easier to understand. Along with
@testing-library/jest-dom
there is an accompanyingeslint-plugin-jest-dom
which enforce using these selectors.Check List
pnpm run prettier
for formatting code and docs