Skip to main content

externalmatches

Callable


  • Creates an expectation that is met when the actual string value matches the expected regular expression.

    Ensuring that a given string matches a regular expression

    import { actorCalled } from '@serenity-js/core'
    import { Ensure, includes } from '@serenity-js/assertions'

    await actorCalled('Ester').attemptsTo(
    Ensure.that('Hello World!', matches(/[Ww]orld/)),
    )

    Parameters

    • externalrest...answerableArguments: [expected: Answerable<RegExp>]

    Returns Expectation<string>