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


稳定性: 1.2 - 发布候选

¥Stability: 1.2 - Release candidate

测试 actualexpected 参数之间的部分深度相等性。"深度" 相等意味着子对象的可枚举 "自有" 属性也按以下规则递归计算。"部分" 相等意味着只比较 expected 参数上存在的属性。

¥Tests for partial deep equality between the actual and expected parameters. "Deep" equality means that the enumerable "own" properties of child objects are recursively evaluated also by the following rules. "Partial" equality means that only properties that exist on the expected parameter are going to be compared.

此方法始终通过与 assert.deepStrictEqual() 相同的测试用例,表现为它的超集。

¥This method always passes the same test cases as assert.deepStrictEqual(), behaving as a super set of it.