Skip to content

Commit ffe7e1a

Browse files
BridgeARaduh95
authored andcommitted
assert: mark partialDeepStrictEqual() as stable
The current implementation is well tested, fast and handles all known edge cases properly. PR-URL: #57370 Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]>
1 parent 43bf1f6 commit ffe7e1a

File tree

5 files changed

+5
-11
lines changed

5 files changed

+5
-11
lines changed

doc/api/assert.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2587,10 +2587,12 @@ argument.
25872587

25882588
<!-- YAML
25892589
added: v22.13.0
2590+
changes:
2591+
- version: REPLACEME
2592+
pr-url: https://github.com/nodejs/node/pull/57370
2593+
description: partialDeepStrictEqual is now Stable. Previously, it had been Experimental.
25902594
-->
25912595

2592-
> Stability: 1.2 - Release candidate
2593-
25942596
* `actual` {any}
25952597
* `expected` {any}
25962598
* `message` {string|Error}

lib/assert.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const {
5454
isPromise,
5555
isRegExp,
5656
} = require('internal/util/types');
57-
const { isError, deprecate, emitExperimentalWarning } = require('internal/util');
57+
const { isError, deprecate } = require('internal/util');
5858
const { innerOk } = require('internal/assert/utils');
5959

6060
const CallTracker = require('internal/assert/calltracker');
@@ -358,7 +358,6 @@ assert.partialDeepStrictEqual = function partialDeepStrictEqual(
358358
expected,
359359
message,
360360
) {
361-
emitExperimentalWarning('assert.partialDeepStrictEqual');
362361
if (arguments.length < 2) {
363362
throw new ERR_MISSING_ARGS('actual', 'expected');
364363
}

test/parallel/test-assert-typedarray-deepequal.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,10 @@ suite('notEqualArrayPairs', () => {
110110
makeBlock(assert.deepStrictEqual, arrayPair[0], arrayPair[1]),
111111
assert.AssertionError
112112
);
113-
// TODO(puskin94): remove emitWarning override once the partialDeepStrictEqual method is not experimental anymore
114-
// Suppress warnings, necessary otherwise the tools/pseudo-tty.py runner will fail
115-
const originalEmitWarning = process.emitWarning;
116-
process.emitWarning = () => {};
117113
assert.throws(
118114
makeBlock(assert.partialDeepStrictEqual, arrayPair[0], arrayPair[1]),
119115
assert.AssertionError
120116
);
121-
process.emitWarning = originalEmitWarning; // Restore original process.emitWarning
122117
});
123118
}
124119
});

test/pseudo-tty/test-assert-colors.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// Flags: --no-warnings
21
'use strict';
32
require('../common');
43
const assert = require('assert').strict;

test/pseudo-tty/test-assert-no-color.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// Flags: --no-warnings
21
'use strict';
32
require('../common');
43
const assert = require('assert').strict;

0 commit comments

Comments
 (0)