@@ -957,55 +957,14 @@ declare module "assert" {
957957 */
958958 function doesNotMatch ( value : string , regExp : RegExp , message ?: string | Error ) : void ;
959959 /**
960- * `assert.partialDeepStrictEqual()` Asserts the equivalence between the `actual` and `expected` parameters through a
961- * deep comparison, ensuring that all properties in the `expected` parameter are
962- * present in the `actual` parameter with equivalent values, not allowing type coercion.
963- * The main difference with `assert.deepStrictEqual()` is that `assert.partialDeepStrictEqual()` does not require
964- * all properties in the `actual` parameter to be present in the `expected` parameter.
965- * This method should always pass the same test cases as `assert.deepStrictEqual()`, behaving as a super set of it.
966- *
967- * ```js
968- * import assert from 'node:assert';
969- *
970- * assert.partialDeepStrictEqual({ a: 1, b: 2 }, { a: 1, b: 2 });
971- * // OK
972- *
973- * assert.partialDeepStrictEqual({ a: { b: { c: 1 } } }, { a: { b: { c: 1 } } });
974- * // OK
975- *
976- * assert.partialDeepStrictEqual({ a: 1, b: 2, c: 3 }, { a: 1, b: 2 });
977- * // OK
978- *
979- * assert.partialDeepStrictEqual(new Set(['value1', 'value2']), new Set(['value1', 'value2']));
980- * // OK
981- *
982- * assert.partialDeepStrictEqual(new Map([['key1', 'value1']]), new Map([['key1', 'value1']]));
983- * // OK
984- *
985- * assert.partialDeepStrictEqual(new Uint8Array([1, 2, 3]), new Uint8Array([1, 2, 3]));
986- * // OK
987- *
988- * assert.partialDeepStrictEqual(/abc/, /abc/);
989- * // OK
990- *
991- * assert.partialDeepStrictEqual([{ a: 5 }, { b: 5 }], [{ a: 5 }]);
992- * // OK
993- *
994- * assert.partialDeepStrictEqual(new Set([{ a: 1 }, { b: 1 }]), new Set([{ a: 1 }]));
995- * // OK
996- *
997- * assert.partialDeepStrictEqual(new Date(0), new Date(0));
998- * // OK
999- *
1000- * assert.partialDeepStrictEqual({ a: 1 }, { a: 1, b: 2 });
1001- * // AssertionError
1002- *
1003- * assert.partialDeepStrictEqual({ a: 1, b: '2' }, { a: 1, b: 2 });
1004- * // AssertionError
960+ * Tests for partial deep equality between the `actual` and `expected` parameters.
961+ * "Deep" equality means that the enumerable "own" properties of child objects
962+ * are recursively evaluated also by the following rules. "Partial" equality means
963+ * that only properties that exist on the `expected` parameter are going to be
964+ * compared.
1005965 *
1006- * assert.partialDeepStrictEqual({ a: { b: 2 } }, { a: { b: '2' } });
1007- * // AssertionError
1008- * ```
966+ * This method always passes the same test cases as `assert.deepStrictEqual()`,
967+ * behaving as a super set of it.
1009968 * @since v22.13.0
1010969 */
1011970 function partialDeepStrictEqual ( actual : unknown , expected : unknown , message ?: string | Error ) : void ;
0 commit comments