-
-
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
add matchers to expect type #8093
Conversation
631cb59
to
b0568ca
Compare
Codecov Report
@@ Coverage Diff @@
## master #8093 +/- ##
=======================================
Coverage 62.46% 62.46%
=======================================
Files 263 263
Lines 10371 10371
Branches 2514 2513 -1
=======================================
Hits 6478 6478
Misses 3317 3317
Partials 576 576
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.
LGTM. let's see what @pedrottimark has to say about it
I will review the details tomorrow. Can you take a first draft at describing benefit for future blog? For test files written in TypeScript, will it supersede quality validation attempted by lint rules? |
Sneaky
In a slightly different way, but yes. The main benefit though is doing Also some type information (e.g. the above |
Thank you for seeing how to improve developer experience! Let’s communicate that TypeScript conversion has outward-facing not just inward-facing benefits. |
All of your suggestions sounds good to me @pedrottimark! Feel free to push them to this branch (I'm on mobile) EDIT: Back at a computer this morning, addressed the feedback! 🙂 |
b0568ca
to
da3c3e1
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.
Thanks again for taking this step forward.
Future improvement - pull these descriptions into the docs (https://jestjs.io/docs/en/expect) so they're not duplicated |
Yes, these short descriptions from Definitely Typed are good push to review ExpectAPI.md file. |
Exporting both |
* upstream/master: (391 commits) more precise circus asyncError types (jestjs#8150) Add typeahead watch plugin (jestjs#6449) fix: getTimerCount not taking immediates and ticks into account (jestjs#8139) website: add an additional filter predicate to backers (jestjs#7286) [🔥] Revised README (jestjs#8076) [jest-each] Fix test function type (jestjs#8145) chore: improve bug template labels for easier maintenance (jestjs#8141) Add documentation related to auto-mocking (jestjs#8099) Add support for bigint to pretty-format (jestjs#8138) Revert "Add fuzzing based tests in Jest (jestjs#8012)" chore: remove console.log chore: Improve description of optional arguments in ExpectAPI.md (jestjs#8126) Add fuzzing based tests in Jest (jestjs#8012) Move @types/node to the root package.json (jestjs#8129) chore: use property initializer syntax (jestjs#8117) chore: delete flow types from the repo (jestjs#8061) Move changelog entry to the proper version (jestjs#8115) Release 24.5.0 Expose throwOnModuleCollision (jestjs#8113) add matchers to expect type (jestjs#8093) ...
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
We know which matchers we have, no reason to just have it as an index string.
Future improvements:
Matcher
interface actually mixes new matchers into the correct interfaceexpect
variable (or potentially mixed in injest-circus
/jest-jasmine2
if possible)Test plan
TS build should still succeed