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

fix!: Correct expect.assertions() count on CommandWith commands #209

Merged

Conversation

lobbin
Copy link
Contributor

@lobbin lobbin commented Jan 31, 2024

What:
When using assertion count with any of the CommandWith commands, they differ in count due to the matcher is using except within the matcher.

Fix:
The fix consists on using equals() from the matcher context instead of using a second expect.

@lobbin lobbin changed the title expect.assertions() fix with CommandWith fix: Correct expect.assertions() with CommandWith Jan 31, 2024
@lobbin lobbin changed the title fix: Correct expect.assertions() with CommandWith fix: Correct expect.assertions() count on CommandWith commands Feb 1, 2024
@lobbin lobbin force-pushed the expect-assertions-count-fix branch from 7969163 to a35e22a Compare February 1, 2024 07:57
@lobbin lobbin marked this pull request as ready for review February 1, 2024 08:01
Copy link
Owner

@m-radzikowski m-radzikowski left a comment

Choose a reason for hiding this comment

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

I did not know there is access to Jest matcher utils there! Thank you!

@m-radzikowski m-radzikowski changed the title fix: Correct expect.assertions() count on CommandWith commands fix!: Correct expect.assertions() count on CommandWith commands Mar 17, 2024
@m-radzikowski m-radzikowski merged commit 65d53a7 into m-radzikowski:main Mar 17, 2024
3 checks passed
@m-radzikowski
Copy link
Owner

Released in v4.0.0. I've bumped the major version not to break any existing tests.

@lobbin lobbin deleted the expect-assertions-count-fix branch March 18, 2024 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants