-
Notifications
You must be signed in to change notification settings - Fork 11
chore: use .toBeCallableWith()
in type tests
#2646
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
base: main
Are you sure you want to change the base?
Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2646 +/- ##
=======================================
Coverage 81.09% 81.09%
=======================================
Files 30 30
Lines 1058 1058
Branches 140 140
=======================================
Hits 858 858
Misses 180 180
Partials 20 20 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
.toBeCallableWith()
in type test.toBeCallableWith()
in type tests
@philibea Could you take a look, please? (; |
To draw attention, TSTyche 4 shipped with
.toBeCallableWith()
as well as.not.toBeCallableWith()
matchers.These can be used instead of
.toRaiseError()
to communicate the intent of the test much better. That also means there will be no red squiggles, because TypeScript will not detect any errors.If there any errors would appear in the type tests (try removing some
.not
), TSTyche will be loud and clear about that: