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.
|
thymikee
left a comment
There was a problem hiding this comment.
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
pedrottimark
left a comment
There was a problem hiding this comment.
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:
Matcherinterface actually mixes new matchers into the correct interfaceexpectvariable (or potentially mixed in injest-circus/jest-jasmine2if possible)Test plan
TS build should still succeed