@nevware21/tripwire-chai - v0.1.2
    Preparing search index...

    Interface Assert

    interface Assert {
        approximately(
            actual: number,
            expected: number,
            delta: number,
            message?: MsgSource,
        ): void;
        changes<T>(
            modifier: Function,
            object: T,
            property: string,
            message?: MsgSource,
        ): void;
        changesButNotBy<T>(
            modifier: Function,
            object: T,
            property: string,
            change: number,
            message?: MsgSource,
        ): void;
        changesButNotBy<T>(
            modifier: Function,
            object: T,
            change: number,
            message?: MsgSource,
        ): void;
        changesBy<T>(
            modifier: Function,
            object: T,
            property: string,
            change: number,
            message?: MsgSource,
        ): void;
        changesBy<T>(
            modifier: Function,
            object: T,
            change: number,
            message?: MsgSource,
        ): void;
        closeTo(
            actual: number,
            expected: number,
            delta: number,
            message?: MsgSource,
        ): void;
        containsAllDeepKeys<T>(
            object: T,
            keys: (string | Object)[] | { [key: string]: any },
            message?: MsgSource,
        ): void;
        containsAllKeys<T>(
            object: T,
            keys: (string | Object)[] | { [key: string]: any },
            message?: MsgSource,
        ): void;
        decreases<T>(
            modifier: Function,
            object: T,
            property?: string,
            message?: MsgSource,
        ): void;
        decreasesButNotBy<T>(
            modifier: Function,
            object: T,
            property: string,
            change: number,
            message?: MsgSource,
        ): void;
        decreasesButNotBy<T>(
            modifier: Function,
            object: T,
            change: number,
            message?: MsgSource,
        ): void;
        decreasesBy<T>(
            modifier: Function,
            object: T,
            property: string,
            change: number,
            message?: MsgSource,
        ): void;
        decreasesBy<T>(
            modifier: Function,
            object: T,
            change: number,
            message?: MsgSource,
        ): void;
        deepEqual<T>(actual: T, expected: T, message?: MsgSource): void;
        deepInclude(haystack: string, needle: string, message?: MsgSource): void;
        deepInclude<T>(
            haystack: ReadonlySet<T> | ReadonlyMap<any, T> | readonly T[],
            needle: T,
            message?: MsgSource,
        ): void;
        deepInclude<T>(
            haystack: T,
            needle: T extends WeakSet<any> ? never : Partial<T>,
            message?: MsgSource,
        ): void;
        deepNestedInclude(haystack: any, needle: any, message?: MsgSource): void;
        deepNestedPropertyVal<T>(
            object: T,
            property: string,
            value: any,
            message?: MsgSource,
        ): void;
        deepOwnInclude(haystack: any, needle: any, message?: MsgSource): void;
        deepOwnPropertyVal<T, V>(
            object: T,
            property: string,
            value: V,
            message?: MsgSource,
        ): void;
        deepProperty<T>(object: T, property: string, message?: MsgSource): void;
        deepPropertyVal<T, V>(
            object: T,
            property: string,
            value: V,
            message?: MsgSource,
        ): void;
        deepStrictEqual<T>(actual: T, expected: T, message?: MsgSource): void;
        doesNotChange<T>(
            modifier: Function,
            object: T,
            property: string,
            message?: MsgSource,
        ): void;
        doesNotDecrease<T>(
            modifier: Function,
            object: T,
            property?: string,
            message?: MsgSource,
        ): void;
        doesNotDecreaseBy<T>(
            modifier: Function,
            object: T,
            property: string,
            change: number,
            message?: MsgSource,
        ): void;
        doesNotDecreaseBy<T>(
            modifier: Function,
            object: T,
            change: number,
            message?: MsgSource,
        ): void;
        doesNotHaveAllDeepKeys<T>(
            object: T,
            keys: (string | Object)[] | { [key: string]: any },
            message?: MsgSource,
        ): void;
        doesNotHaveAllKeys<T>(
            object: T,
            keys: (string | Object)[] | { [key: string]: any },
            message?: MsgSource,
        ): void;
        doesNotHaveAnyDeepKeys<T>(
            object: T,
            keys: (string | Object)[] | { [key: string]: any },
            message?: MsgSource,
        ): void;
        doesNotHaveAnyKeys<T>(
            object: T,
            keys: (string | Object)[] | { [key: string]: any },
            message?: MsgSource,
        ): void;
        doesNotIncrease<T>(
            modifier: Function,
            object: T,
            property?: string,
            message?: MsgSource,
        ): void;
        doesNotThrow(
            fn: () => void,
            errMsgMatcher?: string | RegExp,
            ignored?: any,
            message?: MsgSource,
        ): void;
        doesNotThrow(
            fn: () => void,
            errorLike?: Error | ErrorConstructor,
            errMsgMatcher?: string | RegExp,
            message?: MsgSource,
        ): void;
        empty<T>(object: T, message?: MsgSource): void;
        eq<T>(actual: T, expected: T, message?: MsgSource): void;
        equal<T>(actual: T, expected: T, message?: MsgSource): void;
        equals<T>(actual: T, expected: T, message?: MsgSource): void;
        exists<T>(value: T, message?: MsgSource): asserts value is NonNullable<T>;
        extensible<T>(object: T, message?: MsgSource): void;
        fail(message?: MsgSource): never;
        fail<T>(
            actual: T,
            expected: T,
            message?: MsgSource,
            operator?: string,
        ): never;
        frozen<T>(object: T, message?: MsgSource): void;
        hasAllDeepKeys<T>(
            object: T,
            keys: (string | Object)[] | { [key: string]: any },
            message?: MsgSource,
        ): void;
        hasAllKeys<T>(
            object: T,
            keys: (string | Object)[] | { [key: string]: any },
            message?: MsgSource,
        ): void;
        hasAnyDeepKeys<T>(
            object: T,
            keys: (string | Object)[] | { [key: string]: any },
            message?: MsgSource,
        ): void;
        hasAnyKeys<T>(
            object: T,
            keys: (string | Object)[] | { [key: string]: any },
            message?: MsgSource,
        ): void;
        ifError<T>(object: T, message?: MsgSource): void;
        include(haystack: string, needle: string, message?: MsgSource): void;
        include<T>(
            haystack: ReadonlySet<T> | ReadonlyMap<any, T> | readonly T[],
            needle: T,
            message?: MsgSource,
        ): void;
        include<T extends object>(
            haystack: WeakSet<T>,
            needle: T,
            message?: MsgSource,
        ): void;
        include<T>(haystack: T, needle: Partial<T>, message?: MsgSource): void;
        includeDeepMembers<T>(
            superset: T[],
            subset: T[],
            message?: MsgSource,
        ): void;
        includeDeepOrderedMembers<T>(
            superset: T[],
            subset: T[],
            message?: MsgSource,
        ): void;
        includeMembers<T>(superset: T[], subset: T[], message?: MsgSource): void;
        includeOrderedMembers<T>(
            superset: T[],
            subset: T[],
            message?: MsgSource,
        ): void;
        increases<T>(
            modifier: Function,
            object: T,
            property?: string,
            message?: MsgSource,
        ): void;
        increasesButNotBy<T>(
            modifier: Function,
            object: T,
            property: string,
            change: number,
            message?: MsgSource,
        ): void;
        increasesButNotBy<T>(
            modifier: Function,
            object: T,
            change: number,
            message?: MsgSource,
        ): void;
        increasesBy<T>(
            modifier: Function,
            object: T,
            property: string,
            change: number,
            message?: MsgSource,
        ): void;
        increasesBy<T>(
            modifier: Function,
            object: T,
            change: number,
            message?: MsgSource,
        ): void;
        instanceOf<T>(
            value: unknown,
            constructor: Constructor<T>,
            message?: MsgSource,
        ): asserts value is T;
        isAbove<T extends number | Date>(
            valueToCheck: T,
            valueToBeAbove: T,
            message?: MsgSource,
        ): void;
        isArray<T>(value: T, message?: MsgSource): void;
        isAtLeast<T extends number | Date>(
            valueToCheck: T,
            valueToBeAtLeast: T,
            message?: MsgSource,
        ): void;
        isAtMost<T extends number | Date>(
            valueToCheck: T,
            valueToBeAtMost: T,
            message?: MsgSource,
        ): void;
        isBelow<T extends number | Date>(
            valueToCheck: T,
            valueToBeBelow: T,
            message?: MsgSource,
        ): void;
        isBoolean<T>(value: T, message?: MsgSource): void;
        isCallable<T>(value: T, message?: MsgSource): void;
        isDefined<T>(
            value: T,
            message?: MsgSource,
        ): asserts value is Exclude<T, undefined>;
        isEmpty<T>(object: T, message?: MsgSource): void;
        isExtensible<T>(object: T, message?: MsgSource): void;
        isFalse(value: unknown, message?: MsgSource): asserts value is false;
        isFinite<T>(value: T, message?: MsgSource): void;
        isFrozen<T>(object: T, message?: MsgSource): void;
        isFunction<T>(value: T, message?: MsgSource): void;
        isIterable<T>(value: T, message?: MsgSource): void;
        isNaN<T>(value: T, message?: MsgSource): void;
        isNotArray<T>(value: T, message?: MsgSource): void;
        isNotBoolean<T>(value: T, message?: MsgSource): void;
        isNotCallable<T>(value: T, message?: MsgSource): void;
        isNotEmpty<T>(object: T, message?: MsgSource): void;
        isNotExtensible<T>(object: T, message?: MsgSource): void;
        isNotFalse<T>(
            value: T,
            message?: MsgSource,
        ): asserts value is Exclude<T, false>;
        isNotFrozen<T>(object: T, message?: MsgSource): void;
        isNotFunction<T>(value: T, message?: MsgSource): void;
        isNotNaN<T>(value: T, message?: MsgSource): void;
        isNotNull<T>(
            value: T,
            message?: MsgSource,
        ): asserts value is Exclude<T, null>;
        isNotNumber<T>(value: T, message?: MsgSource): void;
        isNotObject<T>(value: T, message?: MsgSource): void;
        isNotOk<T>(value: T, message?: MsgSource): void;
        isNotSealed<T>(object: T, message?: MsgSource): void;
        isNotString<T>(value: T, message?: MsgSource): void;
        isNotTrue<T>(
            value: T,
            message?: MsgSource,
        ): asserts value is Exclude<T, true>;
        isNull(value: unknown, message?: MsgSource): asserts value is null;
        isNumber<T>(value: T, message?: MsgSource): void;
        isObject<T>(value: T, message?: MsgSource): void;
        isOk(value: unknown, message?: MsgSource): asserts value;
        isSealed<T>(object: T, message?: MsgSource): void;
        isString<T>(value: T, message?: MsgSource): void;
        isTrue(value: unknown, message?: MsgSource): asserts value is true;
        isUndefined(
            value: unknown,
            message?: MsgSource,
        ): asserts value is undefined;
        lengthOf<T extends { length?: number } | { size?: number }>(
            object: T,
            length: number,
            message?: MsgSource,
        ): void;
        match(value: string, regexp: RegExp, message?: MsgSource): void;
        nestedInclude(haystack: any, needle: any, message?: MsgSource): void;
        nestedProperty<T>(object: T, property: string, message?: MsgSource): void;
        nestedPropertyVal<T>(
            object: T,
            property: string,
            value: any,
            message?: MsgSource,
        ): void;
        notDeepEqual<T>(actual: T, expected: T, message?: MsgSource): void;
        notDeepInclude(haystack: string, needle: string, message?: MsgSource): void;
        notDeepInclude<T>(
            haystack: ReadonlySet<T> | ReadonlyMap<any, T> | readonly T[],
            needle: T,
            message?: MsgSource,
        ): void;
        notDeepInclude<T>(
            haystack: T,
            needle: T extends WeakSet<any> ? never : Partial<T>,
            message?: MsgSource,
        ): void;
        notDeepNestedInclude(haystack: any, needle: any, message?: MsgSource): void;
        notDeepNestedPropertyVal<T>(
            object: T,
            property: string,
            value: any,
            message?: MsgSource,
        ): void;
        notDeepOwnInclude(haystack: any, needle: any, message?: MsgSource): void;
        notDeepOwnPropertyVal<T, V>(
            object: T,
            property: string,
            value: V,
            message?: MsgSource,
        ): void;
        notDeepProperty<T>(object: T, property: string, message?: MsgSource): void;
        notDeepPropertyVal<T, V>(
            object: T,
            property: string,
            value: V,
            message?: MsgSource,
        ): void;
        notEmpty<T>(object: T, message?: MsgSource): void;
        notEqual<T>(actual: T, expected: T, message?: MsgSource): void;
        notExists(value: unknown, message?: MsgSource): asserts value is null;
        notExtensible<T>(object: T, message?: MsgSource): void;
        notFrozen<T>(object: T, message?: MsgSource): void;
        notInclude(haystack: string, needle: string, message?: MsgSource): void;
        notInclude<T>(
            haystack: ReadonlySet<T> | ReadonlyMap<any, T> | readonly T[],
            needle: T,
            message?: MsgSource,
        ): void;
        notInclude<T extends object>(
            haystack: WeakSet<T>,
            needle: T,
            message?: MsgSource,
        ): void;
        notInclude<T>(haystack: T, needle: Partial<T>, message?: MsgSource): void;
        notIncludeDeepMembers<T>(
            superset: T[],
            subset: T[],
            message?: MsgSource,
        ): void;
        notIncludeDeepOrderedMembers<T>(
            superset: T[],
            subset: T[],
            message?: MsgSource,
        ): void;
        notIncludeMembers<T>(superset: T[], subset: T[], message?: MsgSource): void;
        notIncludeOrderedMembers<T>(
            superset: T[],
            subset: T[],
            message?: MsgSource,
        ): void;
        notInstanceOf<T, U>(
            value: T,
            type: Constructor<U>,
            message?: MsgSource,
        ): asserts value is Exclude<T, U>;
        notMatch(expected: any, regexp: RegExp, message?: MsgSource): void;
        notNestedInclude(haystack: any, needle: any, message?: MsgSource): void;
        notNestedProperty<T>(
            object: T,
            property: string,
            message?: MsgSource,
        ): void;
        notNestedPropertyVal<T>(
            object: T,
            property: string,
            value: any,
            message?: MsgSource,
        ): void;
        notOk<T>(value: T, message?: MsgSource): void;
        notOwnInclude(haystack: any, needle: any, message?: MsgSource): void;
        notOwnProperty<T>(object: T, property: string, message?: MsgSource): void;
        notOwnPropertyVal<T, V>(
            object: T,
            property: string,
            value: V,
            message?: MsgSource,
        ): void;
        notProperty<T>(object: T, property: string, message?: MsgSource): void;
        notPropertyVal<T, V>(
            object: T,
            property: string,
            value: V,
            message?: MsgSource,
        ): void;
        notSameDeepMembers<T>(set1: T[], set2: T[], message?: MsgSource): void;
        notSameDeepOrderedMembers<T>(
            set1: T[],
            set2: T[],
            message?: MsgSource,
        ): void;
        notSameMembers<T>(set1: T[], set2: T[], message?: MsgSource): void;
        notSameOrderedMembers<T>(set1: T[], set2: T[], message?: MsgSource): void;
        notSealed<T>(object: T, message?: MsgSource): void;
        notStrictEqual<T>(actual: T, expected: T, message?: MsgSource): void;
        notTypeOf<T>(value: T, name: string, message?: MsgSource): void;
        ok(value: unknown, message?: MsgSource): asserts value;
        oneOf<T>(inList: T, list: T[], message?: MsgSource): void;
        operator(
            val1: OperatorComparable,
            operator: string,
            val2: OperatorComparable,
            message?: MsgSource,
        ): void;
        ownInclude(haystack: any, needle: any, message?: MsgSource): void;
        ownProperty<T>(object: T, property: string, message?: MsgSource): void;
        ownPropertyVal<T, V>(
            object: T,
            property: string,
            value: V,
            message?: MsgSource,
        ): void;
        property<T>(object: T, property: string, message?: MsgSource): void;
        propertyVal<T, V>(
            object: T,
            property: string,
            value: V,
            message?: MsgSource,
        ): void;
        sameDeepMembers<T>(set1: T[], set2: T[], message?: MsgSource): void;
        sameDeepOrderedMembers<T>(set1: T[], set2: T[], message?: MsgSource): void;
        sameMembers<T>(set1: T[], set2: T[], message?: MsgSource): void;
        sameOrderedMembers<T>(set1: T[], set2: T[], message?: MsgSource): void;
        sealed<T>(object: T, message?: MsgSource): void;
        strictEqual<T>(actual: T, expected: T, message?: MsgSource): void;
        throw(
            fn: () => void,
            errMsgMatcher?: string | RegExp,
            ignored?: any,
            message?: MsgSource,
        ): void;
        throw(
            fn: () => void,
            errorLike?: Error | ErrorConstructor,
            errMsgMatcher?: string | RegExp,
            message?: MsgSource,
        ): void;
        Throw(
            fn: () => void,
            errMsgMatcher?: string | RegExp,
            ignored?: any,
            message?: MsgSource,
        ): void;
        Throw(
            fn: () => void,
            errorLike?: Error | ErrorConstructor,
            errMsgMatcher?: string | RegExp,
            message?: MsgSource,
        ): void;
        throws(
            fn: () => void,
            errMsgMatcher?: string | RegExp,
            ignored?: any,
            message?: MsgSource,
        ): void;
        throws(
            fn: () => void,
            errorLike?: Error | ErrorConstructor,
            errMsgMatcher?: string | RegExp,
            message?: MsgSource,
        ): void;
        typeOf<T>(value: T, name: string, message?: MsgSource): void;
        (expression: any, message?: MsgSource): asserts expression;
    }
    • Parameters

      • expression: any

        Expression to test for truthiness.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns asserts expression

    Index

    Methods

    approximately changes changesButNotBy changesBy closeTo containsAllDeepKeys containsAllKeys decreases decreasesButNotBy decreasesBy deepEqual deepInclude deepNestedInclude deepNestedPropertyVal deepOwnInclude deepOwnPropertyVal deepProperty deepPropertyVal deepStrictEqual doesNotChange doesNotDecrease doesNotDecreaseBy doesNotHaveAllDeepKeys doesNotHaveAllKeys doesNotHaveAnyDeepKeys doesNotHaveAnyKeys doesNotIncrease doesNotThrow empty eq equal equals exists extensible fail frozen hasAllDeepKeys hasAllKeys hasAnyDeepKeys hasAnyKeys ifError include includeDeepMembers includeDeepOrderedMembers includeMembers includeOrderedMembers increases increasesButNotBy increasesBy instanceOf isAbove isArray isAtLeast isAtMost isBelow isBoolean isCallable isDefined isEmpty isExtensible isFalse isFinite isFrozen isFunction isIterable isNaN isNotArray isNotBoolean isNotCallable isNotEmpty isNotExtensible isNotFalse isNotFrozen isNotFunction isNotNaN isNotNull isNotNumber isNotObject isNotOk isNotSealed isNotString isNotTrue isNull isNumber isObject isOk isSealed isString isTrue isUndefined lengthOf match nestedInclude nestedProperty nestedPropertyVal notDeepEqual notDeepInclude notDeepNestedInclude notDeepNestedPropertyVal notDeepOwnInclude notDeepOwnPropertyVal notDeepProperty notDeepPropertyVal notEmpty notEqual notExists notExtensible notFrozen notInclude notIncludeDeepMembers notIncludeDeepOrderedMembers notIncludeMembers notIncludeOrderedMembers notInstanceOf notMatch notNestedInclude notNestedProperty notNestedPropertyVal notOk notOwnInclude notOwnProperty notOwnPropertyVal notProperty notPropertyVal notSameDeepMembers notSameDeepOrderedMembers notSameMembers notSameOrderedMembers notSealed notStrictEqual notTypeOf ok oneOf operator ownInclude ownProperty ownPropertyVal property propertyVal sameDeepMembers sameDeepOrderedMembers sameMembers sameOrderedMembers sealed strictEqual throw Throw throws typeOf

    Methods

    • Asserts that the target is equal to expected, to within a +/- delta range.

      Parameters

      • actual: number

        Actual value

      • expected: number

        Potential expected value.

      • delta: number

        Maximum differenced between values.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that a function changes the value of a property.

      T Type of object.

      Type Parameters

      • T

      Parameters

      • modifier: Function

        Function to run.

      • object: T

        Container object.

      • property: string

        Property of object expected to be modified.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Type Parameters

      • T

      Parameters

      • modifier: Function
      • object: T
      • property: string
      • change: number
      • Optionalmessage: MsgSource

      Returns void

    • Type Parameters

      • T

      Parameters

      • modifier: Function
      • object: T
      • change: number
      • Optionalmessage: MsgSource

      Returns void

    • Asserts that a function changes the value of a property by an amount (delta).

      Type Parameters

      • T

      Parameters

      • modifier: Function

        function

      • object: T

        or getter function

      • property: string

        name optional

      • change: number

        amount (delta)

      • Optionalmessage: MsgSource

        optional

      Returns void

    • Type Parameters

      • T

      Parameters

      • modifier: Function
      • object: T
      • change: number
      • Optionalmessage: MsgSource

      Returns void

    • Asserts that the target is equal to expected, to within a +/- delta range.

      Parameters

      • actual: number

        Actual value

      • expected: number

        Potential expected value.

      • delta: number

        Maximum differenced between values.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that object contains all of the keys provided. Since Sets and Maps can have objects as keys you can use this assertion to perform a deep comparison. You can also provide a single object instead of a keys array and its keys will be used as the expected set of keys.

      T Type of object.

      Type Parameters

      • T

      Parameters

      • object: T

        Object to test.

      • keys: (string | Object)[] | { [key: string]: any }

        Keys to check

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that object has all of the keys provided but may have more keys not listed. You can also provide a single object instead of a keys array and its keys will be used as the expected set of keys.

      T Type of object.

      Type Parameters

      • T

      Parameters

      • object: T

        Object to test.

      • keys: (string | Object)[] | { [key: string]: any }

        Keys to check

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that a function decreases an object property.

      T Type of object.

      Type Parameters

      • T

      Parameters

      • modifier: Function

        Function to run.

      • object: T

        Container object.

      • Optionalproperty: string

        Property of object expected to be decreased.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that a function does not decreases a numeric object property or a function's return value by an amount (delta)

      T Type of object or function.

      Type Parameters

      • T

      Parameters

      • modifier: Function

        function

      • object: T

        or getter function

      • property: string

        name optional

      • change: number

        amount (delta)

      • Optionalmessage: MsgSource

        optional

      Returns void

    • Type Parameters

      • T

      Parameters

      • modifier: Function
      • object: T
      • change: number
      • Optionalmessage: MsgSource

      Returns void

    • Asserts that a function decreases a numeric object property or a function's return value by an amount (delta)

      T Type of object or function.

      Type Parameters

      • T

      Parameters

      • modifier: Function

        function

      • object: T

        or getter function

      • property: string

        name optional

      • change: number

        amount (delta)

      • Optionalmessage: MsgSource

        optional

      Returns void

    • Type Parameters

      • T

      Parameters

      • modifier: Function
      • object: T
      • change: number
      • Optionalmessage: MsgSource

      Returns void

    • Asserts that actual is deeply equal to expected.

      T Type of the objects.

      Type Parameters

      • T

      Parameters

      • actual: T

        Actual value.

      • expected: T

        Potential expected value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that haystack includes needle. Deep equality is used.

      Parameters

      • haystack: string

        Container string.

      • needle: string

        Potential substring of haystack.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

      Does not have any effect on string. Use Assert#include instead.

    • Asserts that haystack includes needle. Deep equality is used.

      T Type of values in haystack.

      Type Parameters

      • T

      Parameters

      • haystack: ReadonlySet<T> | ReadonlyMap<any, T> | readonly T[]

        Container array, set or map.

      • needle: T

        Potential value contained in haystack.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that haystack does not includes needle.

      T Type of haystack.

      Type Parameters

      • T

      Parameters

      • haystack: T

        Object.

      • needle: T extends WeakSet<any> ? never : Partial<T>

        Potential subset of the haystack's properties.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that ‘haystack’ includes ‘needle’. Can be used to assert the inclusion of a subset of properties in an object while checking for deep equality

      Enables the use of dot- and bracket-notation for referencing nested properties. ‘[]’ and ‘.’ in property names can be escaped using double backslashes.Asserts that ‘haystack’ includes ‘needle’. Can be used to assert the inclusion of a subset of properties in an object. Enables the use of dot- and bracket-notation for referencing nested properties. ‘[]’ and ‘.’ in property names can be escaped using double backslashes.

      Parameters

      • haystack: any
      • needle: any
      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that object has a property named by property with a value given by value. property can use dot- and bracket-notation for nested reference. Uses a deep equality check.

      T Type of object.

      Type Parameters

      • T

      Parameters

      • object: T

        Object to test.

      • property: string

        Property to test.

      • value: any

        Value to test.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that ‘haystack’ includes ‘needle’. Can be used to assert the inclusion of a subset of properties in an object while ignoring inherited properties and checking for deep

      Parameters

      • haystack: any
      • needle: any
      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Type Parameters

      • T
      • V

      Parameters

      • object: T
      • property: string
      • value: V
      • Optionalmessage: MsgSource

      Returns void

    • Asserts that object has a property named by property, which can be a string using dot- and bracket-notation for deep reference.

      T Type of object.

      Type Parameters

      • T

      Parameters

      • object: T

        Container object.

      • property: string

        Potential contained property of object.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that object has a property named by property, which can be a string using dot- and bracket-notation for deep reference.

      T Type of object. V Type of value.

      Type Parameters

      • T
      • V

      Parameters

      • object: T

        Container object.

      • property: string

        Potential contained property of object.

      • value: V

        Potential expected property value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Alias to deepEqual

      T Type of the objects.

      Type Parameters

      • T

      Parameters

      • actual: T

        Actual value.

      • expected: T

        Potential expected value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that a function does not change the value of a property.

      T Type of object.

      Type Parameters

      • T

      Parameters

      • modifier: Function

        Function to run.

      • object: T

        Container object.

      • property: string

        Property of object expected not to be modified.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that a function does not decrease an object property.

      T Type of object.

      Type Parameters

      • T

      Parameters

      • modifier: Function

        Function to run.

      • object: T

        Container object.

      • Optionalproperty: string

        Property of object expected not to be decreased.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that a function does not decreases a numeric object property or a function's return value by an amount (delta)

      T Type of object or function.

      Type Parameters

      • T

      Parameters

      • modifier: Function

        function

      • object: T

        or getter function

      • property: string

        name optional

      • change: number

        amount (delta)

      • Optionalmessage: MsgSource

        optional

      Returns void

    • Type Parameters

      • T

      Parameters

      • modifier: Function
      • object: T
      • change: number
      • Optionalmessage: MsgSource

      Returns void

    • Asserts that object contains all of the keys provided. Since Sets and Maps can have objects as keys you can use this assertion to perform a deep comparison. You can also provide a single object instead of a keys array and its keys will be used as the expected set of keys.

      T Type of object.

      Type Parameters

      • T

      Parameters

      • object: T

        Object to test.

      • keys: (string | Object)[] | { [key: string]: any }

        Keys to check

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that object does not have at least one of the keys provided. You can also provide a single object instead of a keys array and its keys will be used as the expected set of keys.

      T Type of object.

      Type Parameters

      • T

      Parameters

      • object: T

        Object to test.

      • keys: (string | Object)[] | { [key: string]: any }

        Keys to check

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that object contains all of the keys provided. Since Sets and Maps can have objects as keys you can use this assertion to perform a deep comparison. You can also provide a single object instead of a keys array and its keys will be used as the expected set of keys.

      T Type of object.

      Type Parameters

      • T

      Parameters

      • object: T

        Object to test.

      • keys: (string | Object)[] | { [key: string]: any }

        Keys to check

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that object has none of the keys provided. You can also provide a single object instead of a keys array and its keys will be used as the expected set of keys.

      T Type of object.

      Type Parameters

      • T

      Parameters

      • object: T

        Object to test.

      • keys: (string | Object)[] | { [key: string]: any }

        Keys to check

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that a function does not increase an object property.

      T Type of object.

      Type Parameters

      • T

      Parameters

      • modifier: Function

        Function to run.

      • object: T

        Container object.

      • Optionalproperty: string

        Property of object expected not to be increased.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that fn will not throw an error.

      Parameters

      • fn: () => void

        Function that may throw.

      • OptionalerrMsgMatcher: string | RegExp

        Expected error message matcher.

      • Optionalignored: any

        Ignored parameter.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that fn will not throw an error.

      Parameters

      • fn: () => void

        Function that may throw.

      • OptionalerrorLike: Error | ErrorConstructor

        Expected error constructor or error instance.

      • OptionalerrMsgMatcher: string | RegExp

        Expected error message matcher.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that the target does not contain any values. For arrays and strings, it checks the length property. For Map and Set instances, it checks the size property. For non-function objects, it gets the count of own enumerable string keys.

      T Type of object

      Type Parameters

      • T

      Parameters

      • object: T

        Actual value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts non-strict equality (==) of actual and expected.

      T Type of the objects.

      Type Parameters

      • T

      Parameters

      • actual: T

        Actual value.

      • expected: T

        Potential expected value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts non-strict equality (==) of actual and expected.

      T Type of the objects.

      Type Parameters

      • T

      Parameters

      • actual: T

        Actual value.

      • expected: T

        Potential expected value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts non-strict equality (==) of actual and expected.

      T Type of the objects.

      Type Parameters

      • T

      Parameters

      • actual: T

        Actual value.

      • expected: T

        Potential expected value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that the target is neither null nor undefined.

      T Type of value.

      Type Parameters

      • T

      Parameters

      • value: T

        Actual value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns asserts value is NonNullable<T>

    • Asserts that object is extensible (can have new properties added to it).

      T Type of object

      Type Parameters

      • T

      Parameters

      • object: T

        Actual value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Throws a failure.

      Parameters

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns never

      Node.js assert module-compatible.

    • Throws a failure.

      T Type of the objects.

      Type Parameters

      • T

      Parameters

      • actual: T

        Actual value.

      • expected: T

        Potential expected value.

      • Optionalmessage: MsgSource

        Message to display on error.

      • Optionaloperator: string

        Comparison operator, if not strict equality.

      Returns never

      Node.js assert module-compatible.

    • Asserts that object is frozen (cannot have new properties added to it and its existing properties cannot be removed).

      T Type of object

      Type Parameters

      • T

      Parameters

      • object: T

        Actual value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that object has all and only all of the keys provided. Since Sets and Maps can have objects as keys you can use this assertion to perform a deep comparison. You can also provide a single object instead of a keys array and its keys will be used as the expected set of keys.

      T Type of object.

      Type Parameters

      • T

      Parameters

      • object: T

        Object to test.

      • keys: (string | Object)[] | { [key: string]: any }

        Keys to check

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that object has all and only all of the keys provided. You can also provide a single object instead of a keys array and its keys will be used as the expected set of keys.

      T Type of object.

      Type Parameters

      • T

      Parameters

      • object: T

        Object to test.

      • keys: (string | Object)[] | { [key: string]: any }

        Keys to check

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that object has at least one of the keys provided. Since Sets and Maps can have objects as keys you can use this assertion to perform a deep comparison. You can also provide a single object instead of a keys array and its keys will be used as the expected set of keys.

      T Type of object.

      Type Parameters

      • T

      Parameters

      • object: T

        Object to test.

      • keys: (string | Object)[] | { [key: string]: any }

        Keys to check

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that object has at least one of the keys provided. You can also provide a single object instead of a keys array and its keys will be used as the expected set of keys.

      T Type of object.

      Type Parameters

      • T

      Parameters

      • object: T

        Object to test.

      • keys: (string | Object)[] | { [key: string]: any }

        Keys to check

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts if value is not a false value, and throws if it is a true value.

      T Type of object.

      Type Parameters

      • T

      Parameters

      • object: T

        Actual value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

      This is added to allow for chai to be a drop-in replacement for Node’s assert class.

    • Asserts that haystack includes needle.

      Parameters

      • haystack: string

        Container string.

      • needle: string

        Potential substring of haystack.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that haystack includes needle.

      T Type of values in haystack.

      Type Parameters

      • T

      Parameters

      • haystack: ReadonlySet<T> | ReadonlyMap<any, T> | readonly T[]

        Container array, set or map.

      • needle: T

        Potential value contained in haystack.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that haystack includes needle.

      T Type of values in haystack.

      Type Parameters

      • T extends object

      Parameters

      • haystack: WeakSet<T>

        WeakSet container.

      • needle: T

        Potential value contained in haystack.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that haystack includes needle.

      T Type of haystack.

      Type Parameters

      • T

      Parameters

      • haystack: T

        Object.

      • needle: Partial<T>

        Potential subset of the haystack's properties.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that subset is included in superset using deep equality checking. Order is not take into account.

      T Type of set values.

      Type Parameters

      • T

      Parameters

      • superset: T[]

        Actual set of values.

      • subset: T[]

        Potential contained set of values.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that subset is included in superset in the same order beginning with the first element in superset. Uses a deep equality check.

      T Type of set values.

      Type Parameters

      • T

      Parameters

      • superset: T[]

        Actual set of values.

      • subset: T[]

        Potential contained set of values.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that subset is included in superset. Order is not take into account.

      T Type of set values.

      Type Parameters

      • T

      Parameters

      • superset: T[]

        Actual set of values.

      • subset: T[]

        Potential contained set of values.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that subset is included in superset in the same order beginning with the first element in superset. Uses a strict equality check (===).

      T Type of set values.

      Type Parameters

      • T

      Parameters

      • superset: T[]

        Actual set of values.

      • subset: T[]

        Potential contained set of values.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that a function increases an object property.

      T Type of object.

      Type Parameters

      • T

      Parameters

      • modifier: Function

        Function to run.

      • object: T

        Container object.

      • Optionalproperty: string

        Property of object expected to be increased.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that a function does not increase a numeric object property or function's return value by an amount (delta).

      T Type of object or function.

      Type Parameters

      • T

      Parameters

      • modifier: Function

        function

      • object: T

        or getter function

      • property: string

        name optional

      • change: number

        amount (delta)

      • Optionalmessage: MsgSource

        optional

      Returns void

    • Type Parameters

      • T

      Parameters

      • modifier: Function
      • object: T
      • change: number
      • Optionalmessage: MsgSource

      Returns void

    • Asserts that a function increases a numeric object property or a function's return value by an amount (delta).

      T Type of object or function.

      Type Parameters

      • T

      Parameters

      • modifier: Function

        function

      • object: T

        or getter function

      • property: string

        name optional

      • change: number

        amount (delta)

      • Optionalmessage: MsgSource

        optional

      Returns void

    • Type Parameters

      • T

      Parameters

      • modifier: Function
      • object: T
      • change: number
      • Optionalmessage: MsgSource

      Returns void

    • Asserts that value is an instance of constructor.

      T Expected type of value.

      Type Parameters

      • T

      Parameters

      • value: unknown

        Actual value.

      • constructor: Constructor<T>

        Potential expected contructor of value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns asserts value is T

    • Asserts valueToCheck is strictly greater than (>) valueToBeAbove.

      Type Parameters

      • T extends number | Date

      Parameters

      • valueToCheck: T

        Actual value.

      • valueToBeAbove: T

        Minimum Potential expected value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that value is an array.

      T Type of value.

      Type Parameters

      • T

      Parameters

      • value: T

        Actual value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts valueToCheck is greater than or equal to (>=) valueToBeAtLeast.

      Type Parameters

      • T extends number | Date

      Parameters

      • valueToCheck: T

        Actual value.

      • valueToBeAtLeast: T

        Minimum Potential expected value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts valueToCheck is less than or equal to (<=) valueToBeAtMost.

      Type Parameters

      • T extends number | Date

      Parameters

      • valueToCheck: T

        Actual value.

      • valueToBeAtMost: T

        Minimum Potential expected value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts valueToCheck is strictly less than (<) valueToBeBelow.

      Type Parameters

      • T extends number | Date

      Parameters

      • valueToCheck: T

        Actual value.

      • valueToBeBelow: T

        Minimum Potential expected value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that value is a boolean.

      T Type of value.

      Type Parameters

      • T

      Parameters

      • value: T

        Actual value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that value is a callable function, which means that it is a function or an async function, GeneratorFunction, or async GeneratorFunction.

      T Type of value.

      Type Parameters

      • T

      Parameters

      • value: T

        Actual value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that value is not undefined.

      T Type of value.

      Type Parameters

      • T

      Parameters

      • value: T

        Actual value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns asserts value is Exclude<T, undefined>

    • Asserts that the target does not contain any values. For arrays and strings, it checks the length property. For Map and Set instances, it checks the size property. For non-function objects, it gets the count of own enumerable string keys.

      T Type of object

      Type Parameters

      • T

      Parameters

      • object: T

        Actual value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that object is extensible (can have new properties added to it).

      T Type of object

      Type Parameters

      • T

      Parameters

      • object: T

        Actual value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that value is false.

      Parameters

      • value: unknown

        Actual value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns asserts value is false

    • Asserts that value is a finite number. Unlike .isNumber, this will fail for NaN and Infinity.

      T Type of value

      Type Parameters

      • T

      Parameters

      • value: T

        Actual value

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that object is frozen (cannot have new properties added to it and its existing properties cannot be removed).

      T Type of object

      Type Parameters

      • T

      Parameters

      • object: T

        Actual value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that value is a function.

      T Type of value.

      Type Parameters

      • T

      Parameters

      • value: T

        Actual value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that value is NaN.

      T Type of value.

      Type Parameters

      • T

      Parameters

      • value: T

        Actual value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that value is not an array.

      T Type of value.

      Type Parameters

      • T

      Parameters

      • value: T

        Actual value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that value is not a boolean.

      T Type of value.

      Type Parameters

      • T

      Parameters

      • value: T

        Actual value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that value is not a callable function, which means that it is not a function or an async function, GeneratorFunction, or async GeneratorFunction.

      T Type of value.

      Type Parameters

      • T

      Parameters

      • value: T

        Actual value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that the target contains values. For arrays and strings, it checks the length property. For Map and Set instances, it checks the size property. For non-function objects, it gets the count of own enumerable string keys.

      T Type of object.

      Type Parameters

      • T

      Parameters

      • object: T

        Object to test.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that object is not extensible.

      T Type of object

      Type Parameters

      • T

      Parameters

      • object: T

        Actual value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that value is not false.

      Type Parameters

      • T

      Parameters

      • value: T

        Actual value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns asserts value is Exclude<T, false>

    • Asserts that object is not frozen (cannot have new properties added to it and its existing properties cannot be removed).

      T Type of object

      Type Parameters

      • T

      Parameters

      • object: T

        Actual value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that value is not a function.

      T Type of value.

      Type Parameters

      • T

      Parameters

      • value: T

        Actual value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that value is not NaN.

      T Type of value.

      Type Parameters

      • T

      Parameters

      • value: T

        Actual value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that value is not null.

      T Type of value.

      Type Parameters

      • T

      Parameters

      • value: T

        Actual value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns asserts value is Exclude<T, null>

    • Asserts that value is not a number.

      T Type of value.

      Type Parameters

      • T

      Parameters

      • value: T

        Actual value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that value is not an object of type 'Object' (as revealed by Object.prototype.toString).

      T Type of value.

      Type Parameters

      • T

      Parameters

      • value: T

        Actual value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that object is falsy.

      T Type of object.

      Type Parameters

      • T

      Parameters

      • value: T

        Object to test.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that object is not sealed.

      T Type of object

      Type Parameters

      • T

      Parameters

      • object: T

        Actual value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that value is not a string.

      T Type of value.

      Type Parameters

      • T

      Parameters

      • value: T

        Actual value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that value is not true.

      T Type of value.

      Type Parameters

      • T

      Parameters

      • value: T

        Actual value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns asserts value is Exclude<T, true>

    • Asserts that value is null.

      Parameters

      • value: unknown

        Actual value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns asserts value is null

    • Asserts that value is a number.

      T Type of value.

      Type Parameters

      • T

      Parameters

      • value: T

        Actual value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that value is an object of type 'Object' (as revealed by Object.prototype.toString).

      T Type of value.

      Type Parameters

      • T

      Parameters

      • value: T

        Actual value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

      The assertion does not match subclassed objects.

    • Asserts that object is truthy.

      Parameters

      • value: unknown

        Object to test.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns asserts value

    • Asserts that object is sealed (can have new properties added to it and its existing properties cannot be removed).

      T Type of object

      Type Parameters

      • T

      Parameters

      • object: T

        Actual value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that value is a string.

      T Type of value.

      Type Parameters

      • T

      Parameters

      • value: T

        Actual value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that value is true.

      Parameters

      • value: unknown

        Actual value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns asserts value is true

    • Asserts that value is undefined.

      Parameters

      • value: unknown

        Actual value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns asserts value is undefined

    • Asserts that object has a length property with the expected value.

      T Type of object.

      Type Parameters

      • T extends { length?: number } | { size?: number }

      Parameters

      • object: T

        Container object.

      • length: number

        Potential expected length of object.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that value matches the regular expression regexp.

      Parameters

      • value: string

        Actual value.

      • regexp: RegExp

        Potential match of value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that ‘haystack’ includes ‘needle’. Can be used to assert the inclusion of a subset of properties in an object.

      Enables the use of dot- and bracket-notation for referencing nested properties. ‘[]’ and ‘.’ in property names can be escaped using double backslashes.Asserts that ‘haystack’ includes ‘needle’. Can be used to assert the inclusion of a subset of properties in an object. Enables the use of dot- and bracket-notation for referencing nested properties. ‘[]’ and ‘.’ in property names can be escaped using double backslashes.

      Parameters

      • haystack: any
      • needle: any
      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that object has a direct or inherited property named by property, which can be a string using dot- and bracket-notation for nested reference.

      T Type of object.

      Type Parameters

      • T

      Parameters

      • object: T

        Object to test.

      • property: string

        Property to test.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that object has a property named by property with value given by value. property can use dot- and bracket-notation for nested reference. Uses a strict equality check (===).

      T Type of object.

      Type Parameters

      • T

      Parameters

      • object: T

        Object to test.

      • property: string

        Property to test.

      • value: any

        Value to test.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that actual is not deeply equal to expected.

      T Type of the objects.

      Type Parameters

      • T

      Parameters

      • actual: T

        Actual value.

      • expected: T

        Potential expected value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that haystack does not includes needle. Deep equality is used.

      Parameters

      • haystack: string

        Container string.

      • needle: string

        Potential substring of haystack.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

      Does not have any effect on string. Use Assert#notInclude instead.

    • Asserts that haystack does not includes needle. Deep equality is used.

      T Type of values in haystack.

      Type Parameters

      • T

      Parameters

      • haystack: ReadonlySet<T> | ReadonlyMap<any, T> | readonly T[]

        Container array, set or map.

      • needle: T

        Potential value contained in haystack.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that haystack does not includes needle. Deep equality is used.

      T Type of haystack.

      Type Parameters

      • T

      Parameters

      • haystack: T

        Object.

      • needle: T extends WeakSet<any> ? never : Partial<T>

        Potential subset of the haystack's properties.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that ‘haystack’ does not include ‘needle’. Can be used to assert the absence of a subset of properties in an object while checking for deep equality.

      Enables the use of dot- and bracket-notation for referencing nested properties. ‘[]’ and ‘.’ in property names can be escaped using double backslashes.Asserts that ‘haystack’ includes ‘needle’. Can be used to assert the inclusion of a subset of properties in an object. Enables the use of dot- and bracket-notation for referencing nested properties. ‘[]’ and ‘.’ in property names can be escaped using double backslashes.

      Parameters

      • haystack: any
      • needle: any
      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that object does not have a property named by property with value given by value. property can use dot- and bracket-notation for nested reference. Uses a deep equality check.

      T Type of object.

      Type Parameters

      • T

      Parameters

      • object: T

        Object to test.

      • property: string

        Property to test.

      • value: any

        Value to test.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that ‘haystack’ includes ‘needle’. Can be used to assert the absence of a subset of properties in an object while ignoring inherited properties and checking for deep equality.

      Parameters

      • haystack: any
      • needle: any
      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Type Parameters

      • T
      • V

      Parameters

      • object: T
      • property: string
      • value: V
      • Optionalmessage: MsgSource

      Returns void

    • Asserts that object does not have a property named by property, which can be a string using dot- and bracket-notation for deep reference.

      T Type of object.

      Type Parameters

      • T

      Parameters

      • object: T

        Container object.

      • property: string

        Potential contained property of object.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that object does not have a property named by property, which can be a string using dot- and bracket-notation for deep reference.

      T Type of object. V Type of value.

      Type Parameters

      • T
      • V

      Parameters

      • object: T

        Container object.

      • property: string

        Potential contained property of object.

      • value: V

        Potential expected property value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that the target contains values. For arrays and strings, it checks the length property. For Map and Set instances, it checks the size property. For non-function objects, it gets the count of own enumerable string keys.

      T Type of object.

      Type Parameters

      • T

      Parameters

      • object: T

        Object to test.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts non-strict inequality (!=) of actual and expected.

      T Type of the objects.

      Type Parameters

      • T

      Parameters

      • actual: T

        Actual value.

      • expected: T

        Potential expected value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that the target is either null or undefined.

      Parameters

      • value: unknown

        Actual value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns asserts value is null

    • Asserts that object is not extensible.

      T Type of object

      Type Parameters

      • T

      Parameters

      • object: T

        Actual value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that object is not frozen (cannot have new properties added to it and its existing properties cannot be removed).

      T Type of object

      Type Parameters

      • T

      Parameters

      • object: T

        Actual value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that haystack does not includes needle.

      Parameters

      • haystack: string

        Container string.

      • needle: string

        Potential substring of haystack.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that haystack does not includes needle.

      T Type of values in haystack.

      Type Parameters

      • T

      Parameters

      • haystack: ReadonlySet<T> | ReadonlyMap<any, T> | readonly T[]

        Container array, set or map.

      • needle: T

        Potential value contained in haystack.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that haystack does not includes needle.

      T Type of values in haystack.

      Type Parameters

      • T extends object

      Parameters

      • haystack: WeakSet<T>

        WeakSet container.

      • needle: T

        Potential value contained in haystack.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that haystack does not includes needle.

      T Type of haystack.

      Type Parameters

      • T

      Parameters

      • haystack: T

        Object.

      • needle: Partial<T>

        Potential subset of the haystack's properties.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that subset isn't included in superset in any order. Uses a deep equality check. Duplicates are ignored.

      assert.notIncludeDeepMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [ { b: 2 }, { f: 5 } ], 'not include deep members');

      T Type of set values.

      Type Parameters

      • T

      Parameters

      • superset: T[]

        Actual set of values.

      • subset: T[]

        Potential contained set of values.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that subset isn’t included in superset in the same order beginning with the first element in superset. Uses a deep equality check.

      T Type of set values.

      Type Parameters

      • T

      Parameters

      • superset: T[]

        Actual set of values.

      • subset: T[]

        Potential contained set of values.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that subset isn’t included in superset in any order. Uses a strict equality check (===). Duplicates are ignored.

      T Type of set values.

      Type Parameters

      • T

      Parameters

      • superset: T[]

        Actual set of values.

      • subset: T[]

        Potential not contained set of values.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that subset isn’t included in superset in the same order beginning with the first element in superset. Uses a strict equality check (===).

      T Type of set values.

      Type Parameters

      • T

      Parameters

      • superset: T[]

        Actual set of values.

      • subset: T[]

        Potential contained set of values.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that value is not an instance of constructor.

      T Type of value. U Type that value shouldn't be an instance of.

      Type Parameters

      • T
      • U

      Parameters

      • value: T

        Actual value.

      • type: Constructor<U>

        Potential expected contructor of value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns asserts value is Exclude<T, U>

    • Asserts that value does not match the regular expression regexp.

      Parameters

      • expected: any

        Actual value.

      • regexp: RegExp

        Potential match of value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that ‘haystack’ does not include ‘needle’. Can be used to assert the absence of a subset of properties in an object.

      Enables the use of dot- and bracket-notation for referencing nested properties. ‘[]’ and ‘.’ in property names can be escaped using double backslashes.Asserts that ‘haystack’ includes ‘needle’. Can be used to assert the inclusion of a subset of properties in an object. Enables the use of dot- and bracket-notation for referencing nested properties. ‘[]’ and ‘.’ in property names can be escaped using double backslashes.

      Parameters

      • haystack: any
      • needle: any
      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that object does not have a property named by property, which can be a string using dot- and bracket-notation for nested reference. The property cannot exist on the object nor anywhere in its prototype chain.

      T Type of object.

      Type Parameters

      • T

      Parameters

      • object: T

        Object to test.

      • property: string

        Property to test.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that object does not have a property named by property with value given by value. property can use dot- and bracket-notation for nested reference. Uses a strict equality check (===).

      T Type of object.

      Type Parameters

      • T

      Parameters

      • object: T

        Object to test.

      • property: string

        Property to test.

      • value: any

        Value to test.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that object is falsy.

      T Type of object.

      Type Parameters

      • T

      Parameters

      • value: T

        Object to test.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that ‘haystack’ includes ‘needle’. Can be used to assert the absence of a subset of properties in an object while ignoring inherited properties.

      Parameters

      • haystack: any
      • needle: any
      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that object does not have it's own property named by property.

      T Type of object.

      Type Parameters

      • T

      Parameters

      • object: T

        Container object.

      • property: string

        Potential contained property of object.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that object does not have it's own property named by property with value given by value.

      T Type of object. V Type of value.

      Type Parameters

      • T
      • V

      Parameters

      • object: T

        Container object.

      • property: string

        Potential contained property of object.

      • value: V

        Potential expected property value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that object has a property named by property.

      T Type of object.

      Type Parameters

      • T

      Parameters

      • object: T

        Container object.

      • property: string

        Potential contained property of object.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that object has a property named by property with value given by value.

      T Type of object. V Type of value.

      Type Parameters

      • T
      • V

      Parameters

      • object: T

        Container object.

      • property: string

        Potential contained property of object.

      • value: V

        Potential expected property value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that set1 and set2 don't have the same members in any order. Uses a deep equality check.

      T Type of set values.

      Type Parameters

      • T

      Parameters

      • set1: T[]
      • set2: T[]
      • Optionalmessage: MsgSource

      Returns void

    • Asserts that set1 and set2 don’t have the same members in the same order. Uses a deep equality check.

      T Type of set values.

      Type Parameters

      • T

      Parameters

      • set1: T[]

        Actual set of values.

      • set2: T[]

        Potential expected set of values.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that set1 and set2 don’t have the same members in the same order. Uses a strict equality check (===).

      T Type of set values.

      Type Parameters

      • T

      Parameters

      • set1: T[]

        Actual set of values.

      • set2: T[]

        Potential expected set of values.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that object is not sealed.

      T Type of object

      Type Parameters

      • T

      Parameters

      • object: T

        Actual value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts strict inequality (!==) of actual and expected.

      T Type of the objects.

      Type Parameters

      • T

      Parameters

      • actual: T

        Actual value.

      • expected: T

        Potential expected value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that value's type is not name, as determined by Object.prototype.toString.

      T Type of value.

      Type Parameters

      • T

      Parameters

      • value: T

        Actual value.

      • name: string

        Potential expected type name of value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that object is truthy.

      Parameters

      • value: unknown

        Object to test.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns asserts value

    • Asserts that non-object, non-array value inList appears in the flat array list.

      T Type of list values.

      Type Parameters

      • T

      Parameters

      • inList: T

        Value expected to be in the list.

      • list: T[]

        List of values.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that ‘haystack’ includes ‘needle’. Can be used to assert the inclusion of a subset of properties in an object while ignoring inherited properties.

      Parameters

      • haystack: any
      • needle: any
      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that object has its own property named by property.

      T Type of object.

      Type Parameters

      • T

      Parameters

      • object: T

        Container object.

      • property: string

        Potential contained property of object.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that object has it's own property named by property with value given by value.

      T Type of object. V Type of value.

      Type Parameters

      • T
      • V

      Parameters

      • object: T

        Container object.

      • property: string

        Potential contained property of object.

      • value: V

        Potential expected property value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that object has a property named by property.

      T Type of object.

      Type Parameters

      • T

      Parameters

      • object: T

        Container object.

      • property: string

        Potential contained property of object.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that object has a property named by property with value given by value.

      T Type of object. V Type of value.

      Type Parameters

      • T
      • V

      Parameters

      • object: T

        Container object.

      • property: string

        Potential contained property of object.

      • value: V

        Potential expected property value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that set1 and set2 have the same members using deep equality checking. Order is not take into account.

      T Type of set values.

      Type Parameters

      • T

      Parameters

      • set1: T[]

        Actual set of values.

      • set2: T[]

        Potential expected set of values.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that set1 and set2 have the same members in the same order. Uses a deep equality check.

      T Type of set values.

      Type Parameters

      • T

      Parameters

      • set1: T[]

        Actual set of values.

      • set2: T[]

        Potential expected set of values.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that set1 and set2 have the same members. Order is not take into account.

      T Type of set values.

      Type Parameters

      • T

      Parameters

      • set1: T[]

        Actual set of values.

      • set2: T[]

        Potential expected set of values.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that set1 and set2 have the same members in the same order. Uses a strict equality check (===).

      T Type of set values.

      Type Parameters

      • T

      Parameters

      • set1: T[]

        Actual set of values.

      • set2: T[]

        Potential expected set of values.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that object is sealed (can have new properties added to it and its existing properties cannot be removed).

      T Type of object

      Type Parameters

      • T

      Parameters

      • object: T

        Actual value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts strict equality (===) of actual and expected.

      T Type of the objects.

      Type Parameters

      • T

      Parameters

      • actual: T

        Actual value.

      • expected: T

        Potential expected value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that fn will throw an error.

      Parameters

      • fn: () => void

        Function that may throw.

      • OptionalerrMsgMatcher: string | RegExp

        Expected error message matcher.

      • Optionalignored: any

        Ignored parameter.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that fn will throw an error.

      Parameters

      • fn: () => void

        Function that may throw.

      • OptionalerrorLike: Error | ErrorConstructor

        Expected error constructor or error instance.

      • OptionalerrMsgMatcher: string | RegExp

        Expected error message matcher.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that fn will throw an error.

      Parameters

      • fn: () => void

        Function that may throw.

      • OptionalerrMsgMatcher: string | RegExp

        Expected error message matcher.

      • Optionalignored: any

        Ignored parameter.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that fn will throw an error.

      Parameters

      • fn: () => void

        Function that may throw.

      • OptionalerrorLike: Error | ErrorConstructor

        Expected error constructor or error instance.

      • OptionalerrMsgMatcher: string | RegExp

        Expected error message matcher.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that fn will throw an error.

      Parameters

      • fn: () => void

        Function that may throw.

      • OptionalerrMsgMatcher: string | RegExp

        Expected error message matcher.

      • Optionalignored: any

        Ignored parameter.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that fn will throw an error.

      Parameters

      • fn: () => void

        Function that may throw.

      • OptionalerrorLike: Error | ErrorConstructor

        Expected error constructor or error instance.

      • OptionalerrMsgMatcher: string | RegExp

        Expected error message matcher.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void

    • Asserts that value's type is name, as determined by Object.prototype.toString.

      T Type of value.

      Type Parameters

      • T

      Parameters

      • value: T

        Actual value.

      • name: string

        Potential expected type name of value.

      • Optionalmessage: MsgSource

        Message to display on error.

      Returns void