Skip to main content

not

Callable

  • not<Actual>(expectation: Expectation<Actual>): Expectation<Actual>

  • Produces an expectation that negates the provided expectation.

    Ensuring that the actual value does not equal the expected value

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

    const actual = { name: 'apples' }
    const expected = { name: 'bananas' }

    await actorCalled('Ester').attemptsTo(
    Ensure.that(actual, not(equals(expected))),
    )

    Type parameters

    • Actual

    Parameters

    • expectation: Expectation<Actual>

    Returns Expectation<Actual>