What is the problem this feature will solve?
I use strict assertion mode in my tests:
import assert from "node:assert/strict";
assert.equal("...", "...");
assert.deepEqual({ "..." }, { "..." });
assert.partialDeepEqual({ "..." }, { "..." });
But the partialDeepEqual() doesn't exist. You have to use partialDeepStrictEqual() that has the word Strict in its name, whereas the other methods do not.
What is the feature you are proposing to solve the problem?
The "node:assert/strict" module should re-export partialDeepStrictEqual() with the name partialDeepEqual() so that function names are consistent in strict assertion mode.
Additional information
The partialDeepStrictEqual() function was added with #54630. I couldn't find any references to the terms strict assertion mode.
"Re-export" takes place in two locations:
I don't think adding the following two lines is enough?
// if (options.strict) {
this.partialDeepEqual = this.partialDeepStrictEqual;
// assert.strict = ObjectAssign(strict, assert, {
partialDeepEqual: assert.partialDeepStrictEqual,
Because partialDeepEqual() doesn't exist in legacy assertion mode. So we need to manage the fact that the Assert type will be different between the two modes.
What is the problem this feature will solve?
I use strict assertion mode in my tests:
But the
partialDeepEqual()doesn't exist. You have to usepartialDeepStrictEqual()that has the word Strict in its name, whereas the other methods do not.What is the feature you are proposing to solve the problem?
The
"node:assert/strict"module should re-exportpartialDeepStrictEqual()with the namepartialDeepEqual()so that function names are consistent in strict assertion mode.Additional information
The
partialDeepStrictEqual()function was added with #54630. I couldn't find any references to the terms strict assertion mode."Re-export" takes place in two locations:
Probably for
import assert from "node:assert/strict"node/lib/assert.js
Lines 126 to 131 in 56aba88
Probably for
import { strict as assert } from "node:assert"node/lib/assert.js
Lines 894 to 899 in 56aba88
I don't think adding the following two lines is enough?
Because
partialDeepEqual()doesn't exist in legacy assertion mode. So we need to manage the fact that theAsserttype will be different between the two modes.