-
Notifications
You must be signed in to change notification settings - Fork 3
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
Typings test #33
Typings test #33
Conversation
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.
@smartclash, I left a couple of comments -- the main one being, that when we are testing types, it would be ideal not to be testing for any
. Kind of defeats the point?
I understand that the TSD assertion tests do add value even when we don't test the return type, as it does test against the function parameters and reports any type errors to jest.
I'd ask Simen for feedback on this ASAP. In order to help him give good feedback, I'd improve the PR description explaining what you are asking feedback on -- overall approach, not individual tests. Also, I would explain that this is not full type coverage yet, and you intend to do that after the approach has been validated.
Personally, if you don't have anything else to do, I'd not wait any longer for feedback and proceed with writing tests for further APIs using this approach.
@jevakallio, the functions itself return |
@SimenB please review this PR and let us know if the approach we are following is good or requires any changes? This PR is related to jestjs#8794 |
Yeah, I like this approach! I'd like to see some tests for type errors tho - missing arguments and arguments with wrong type etc. I wonder if we should just run this as part of the |
Co-authored-by: Simen Bekkhus <sbekkhus91@gmail.com>
Moved to #jestjs#10407. Merged there. Closing this. |
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. |
Typings tests for public facing API would be now written inside the
test-types/
folder. It uses TSD and jest-runner-tsd.We still haven't covered every API available. This is at it's start and we need to get more inputs on our approach. We'd like to know if
... and suggestions would be really good too :)
We are now using jest's projects to use the custom runner and test the types.
TODOs: