-
-
Notifications
You must be signed in to change notification settings - Fork 225
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
Handle .not
cases in toThrowWithMessage
#173
base: main
Are you sure you want to change the base?
Conversation
ce3c906
to
fef3e82
Compare
Codecov Report
@@ Coverage Diff @@
## master #173 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 109 109
Lines 554 555 +1
Branches 97 98 +1
=====================================
+ Hits 554 555 +1
Continue to review full report at Codecov.
|
Hey @mattphillips, can we get this merged in? My current implementation only handled the happy case. :) |
Sorry about the huge delay... Could you rebase this? 🙂 |
I merged in some of |
I'll take a look at this next week no sweat :) |
I added this test and it seemed to pass. Is this still an issue. test('my test', () => {
expect(() => {
throw new TypeError('Expected message');
}).not.toThrowWithMessage.call(
{ utils: { matcherHint: matcherHint, printExpected: printExpected, printReceived: printReceived } },
SyntaxError,
'Expected message',
);
}); |
What
During the initial implementation of
toThrowWithMessage
I forgot to handle the.not
during validation. As such, when a user uses.not
, validation doesn't work at all.Why
The matcher won't correctly validate
.not
cases.Notes
Housekeeping
yarn contributor
)