Skip to content
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

feat(function-assertion): Add .toThrow(Error) overload #65

Merged
merged 2 commits into from
Sep 2, 2022

Conversation

JoseLion
Copy link
Member

@JoseLion JoseLion commented Aug 31, 2022

Add an overload to the .toThrow() matcher so we can match against an error instance directly. The errors are strictly compared.

Add an overload to the `.toThrow()` matcher so we can match against an error instance directly. The errors are compared to be strictly equal.
@JoseLion JoseLion force-pushed the feat/to-thow-overload branch from 7ddec0d to ba9d042 Compare September 2, 2022 22:41
Copy link
Member

@byrpatrick byrpatrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!! 💯 I left a comment with a typo that I found.

@JoseLion I think for now on it would be good if we improve a matcher that doesn't have an example, to include it on the same PR, this way it would be easier to complete #41 with the missing examples, wdyt?

src/lib/FunctionAssertion.ts Outdated Show resolved Hide resolved
@JoseLion JoseLion merged commit a32e820 into main Sep 2, 2022
@JoseLion JoseLion deleted the feat/to-thow-overload branch September 2, 2022 23:00
Copy link

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants