@jakobkg/expect
    Preparing search index...

    Type Alias CommonMatchers<T>

    Matchers available for every value.

    type CommonMatchers<T> = {
        toBe(expected: unknown): void;
        toEqual(expected: T): void;
        toBeTruthy(): void;
        toBeNull(): void;
        toBeUndefined(): void;
        toBePresent(): void;
    }

    Type Parameters

    • T
    Index
    • Passes if the value is identical to expected, compared with Object.is. Objects and arrays only pass when they are the same instance; use toEqual to compare their contents. NaN is identical to NaN, but 0 is not identical to -0.

      Parameters

      • expected: unknown

      Returns void

    • Passes if the value is deeply equal to expected, using the rules of assert.deepStrictEqual from node:assert: contents are compared recursively, and prototypes must match as well.

      Parameters

      • expected: T

      Returns void

    • Passes if the value is neither null nor undefined.

      Returns void