Skip to main content

externalor

Callable


  • Creates an expectation that is met when at least one of the expectations is met for the given actual value.

    Use or to combine several expectations using logical "or",

    Combining several expectations

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

    await actorCalled('Ester').attemptsTo(
    Ensure.that('Hello World!', or(startsWith('Hello'), startsWith('Hi'))),
    )

    Type parameters

    • Actual_Type

    Parameters

    • externalrest...expectations: Expectation<Actual_Type>[]

    Returns Expectation<Actual_Type>