-
Notifications
You must be signed in to change notification settings - Fork 12
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 68.92% 68.92%
=======================================
Files 44 44
Lines 1297 1297
Branches 181 181
=======================================
Hits 894 894
Misses 380 380
Partials 23 23 ☔ 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: