Skip to main content



  • or<Actual_Type>(...expectations: Expectation<Actual_Type>[]): Expectation<Actual_Type>

  • 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


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

    Returns Expectation<Actual_Type>