Skip to main content

deepEqual

function assert.deepEqual
Jump to headingdeepEqual(
actual: unknown,
expected: unknown,
message?: string | Error,
): void

Strict assertion mode

An alias of deepStrictEqual.

Legacy assertion mode

Stability: 3 - Legacy: Use deepStrictEqual instead.

Tests for deep equality between the actual and expected parameters. Consider using deepStrictEqual instead. deepEqual can have surprising results.

Deep equality means that the enumerable "own" properties of child objects are also recursively evaluated by the following rules.

Parameters Jump to heading

Jump to headingactual: unknown
Jump to headingexpected: unknown
optional
Jump to headingmessage: string | Error

Return Type Jump to heading

void
Back to top