assert.deepEqual(actual, expected[, message])


严格断言模式

assert.deepStrictEqual() 的别名。

旧版断言模式

稳定性: 0 - 弃用: 改为使用 assert.deepStrictEqual()

测试 actualexpected 参数之间的深度相等。 考虑使用 assert.deepStrictEqual() 代替。 assert.deepEqual() 可能产生意外的结果。

深度相等意味着子对象的可枚举"自有"属性也按照以下规则递归地评估。

Strict assertion mode

An alias of assert.deepStrictEqual().

Legacy assertion mode

Stability: 0 - Deprecated: Use assert.deepStrictEqual() instead.

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

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