-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
chore: move typecheck test files from root into packages #12099
Conversation
export type E = expect.Matchers<>; | ||
// @ts-expect-error: Generic type 'Matchers<R, T>' requires between 1 and 2 type arguments. | ||
export type E = expect.Matchers; |
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 was my mistake. // @ts-expect-error
was silencing syntax error instead of expected type error. Wrapping the code into expect()
would help to avoid mistakes like this one. Just another motivation for Jestish typecheck runner. Working on it.
Codecov Report
@@ Coverage Diff @@
## main #12099 +/- ##
==========================================
- Coverage 68.91% 67.65% -1.26%
==========================================
Files 324 328 +4
Lines 16681 16989 +308
Branches 4814 4817 +3
==========================================
- Hits 11495 11494 -1
- Misses 5153 5462 +309
Partials 33 33
Continue to review full report at Codecov.
|
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.
thanks!
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
Split from #12059
Moving these files from root into packages simplifies setup of typechecks and allows to test type of packages in isolation. At this moment the need is not clear. As it was explained in #12059, in the future this setup will help to check that types added by Jest (
snapshotState
,addSnapshotSerializer
andSnapshotMatchers
) do not leak toexpect
package.Test plan
Just move and renamed the files. All should work as before.