-
-
Notifications
You must be signed in to change notification settings - Fork 264
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 #997
test: add jest-dom matchers and eslint plugin #997
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. |
commit: |
d016dd4
to
2e0e4e9
Compare
2e0e4e9
to
c3d6ecd
Compare
c3d6ecd
to
6483f5d
Compare
@@ -2,7 +2,6 @@ | |||
"compilerOptions": { | |||
"target": "esnext", | |||
"strict": true, | |||
"lib": ["es2023"], |
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.
This line seems to be problematic with my changes and old TS versions. Zustand supports the same range of TypeScript versions but lacks this line. Maybe it can be safely removed?
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.
It's added in #930. I think it's related to } catch {
change.
If omitting this line goes well, I think it's fine to remove.
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.
Seems like using "lib": ["dom"]
satisfies all TS versions.
6483f5d
to
469a1d8
Compare
469a1d8
to
e8a3d02
Compare
e8a3d02
to
8cc6364
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