method Assert.prototype.notPropContains
Assert.prototype.notPropContains(
actual: unknown,
expected: unknown,
message?: string
): void

Asserts that actual does NOT contain all own enumerable properties from expected with matching values. Inverse of Assert.prototype.propContains.

Examples

Example 1

assert.notPropContains({ a: 1, b: 2 }, { a: 9 });
assert.notPropContains(user, { role: "banned" });

Parameters

actual: unknown

The actual object.

expected: unknown

The subset of properties that must NOT all match.

optional
message: string

Optional failure message.

Return Type

void

Usage

import { Assert } from ".";