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

assert: implement assert.match() #30929

Closed
wants to merge 1 commit into from

Commits on Dec 31, 2019

  1. assert: implement assert.match() and assert.doesNotMatch()

    This adds a new functionality to the assertion module: a dedicated
    check for regular expressions. So far it's possible to use
    `assert.ok(regexp.test(string))`. This is not ideal though when it
    comes to the error message, since it's not possible to know how
    either of the input values look like. It's just known that the
    assertion failed.
    This allows to pass through the regular expression and the input
    string. The string is then matched against the regular expression
    and reports a expressive error message in case of a failure.
    BridgeAR committed Dec 31, 2019
    Copy the full SHA
    4f82ee6 View commit details
    Browse the repository at this point in the history