Skip to main content

endsWith

Callable

  • endsWith(...answerableArguments: [expected: Answerable<string>]): Expectation<string>

  • Creates an expectation that is met when the actual string value ends with the resolved value of expected.

    Ensuring that a given string ends with an expected substring

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

    await actorCalled('Ester').attemptsTo(
    Ensure.that('Hello World!', endsWith('!')),
    )

    Parameters

    • rest...answerableArguments: [expected: Answerable<string>]

    Returns Expectation<string>