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

t.match with two params logs failure message even on successful match #494

Closed
dchambers opened this issue Jan 9, 2020 · 1 comment
Closed
Labels

Comments

@dchambers
Copy link

If you omit the optional third argument when using the new the t.match assertion, a default message is written to the console as per all other assertions, but currently it incorrectly comes to the conclusion that the match was a failure even when it passes.

For example:

ok 1 The input did not match the regular expression /abc/. Input: 'abc123'
@ljharb
Copy link
Collaborator

ljharb commented Jan 9, 2020

Whoops :-) good catch!

@ljharb ljharb added the bug label Jan 9, 2020
@ljharb ljharb closed this as completed in 13bd0e1 Jan 9, 2020
ljharb added a commit that referenced this issue Jan 9, 2020
v4.13.1

 - [Fix] `match`/`doesNotMatch`: when passing, ensure the proper default assert message shows up (#494)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants