typefinity
    Preparing search index...

    Function expect

    • Perform assertions on a function (inspecting the value it returns or the error that it throws)

      Type Parameters

      • T

      Parameters

      • fn: () => T

        The function to inspect

      Returns CallbackAssertions<() => T>

      Assertions applicable to the return value or errors raised by the function

    • Perform assertions on a promise

      Type Parameters

      • T

      Parameters

      • promise: Promise<T>

        The promise to inspect

      Returns PromiseAssertions<Promise<Awaited<T>>>

      Assertions applicable to promises

    • Perform assertions on any value or object

      Type Parameters

      • T

      Parameters

      • value: T

        The value or object to inspect

      Returns GeneralAssertions<T>

      Assertions applicable to the given value (type)

    Index