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

Feature reqest: expect.toMatch() to check is string matches RegExp #597

Open
mbyrne00 opened this issue May 3, 2023 · 0 comments
Open

Comments

@mbyrne00
Copy link

mbyrne00 commented May 3, 2023

Feature Request

Description: I would like to be able to use expect.toMatch(/test-string-[\w-]+/) with regular expression support. This is equivalent to expect("test-string-A4454556565").toMatch(/test-string-[\w-]+/)

Possible solution:
I can currently use expect.toSatisfy((src) => /test-string-[\w-]+/.test(src)); as a workaround but it would be nice for the API to support this out-of-box and also produce a more meaningful message when it fails.

Thanks for lib!

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

No branches or pull requests

1 participant