Skip to content

Commit d23b8a0

Browse files
BridgeARnodejs-github-bot
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 ebbc5f7 commit d23b8a0

File tree

5 files changed

+6
-10
lines changed

5 files changed

+6
-10
lines changed

Diff for: doc/api/assert.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -2594,9 +2594,13 @@ argument.
25942594
added:
25952595
- v23.4.0
25962596
- v22.13.0
2597+
changes:
2598+
- version: REPLACEME
2599+
pr-url: https://github.com/nodejs/node/pull/57370
2600+
description: partialDeepStrictEqual is now Stable. Previously, it had been Experimental.
25972601
-->
25982602

2599-
> Stability: 1.2 - Release candidate
2603+
> Stability: 2 - Stable
26002604
26012605
* `actual` {any}
26022606
* `expected` {any}

Diff for: lib/assert.js

+1-2
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
}

Diff for: test/parallel/test-assert-typedarray-deepequal.js

-5
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,10 @@ suite('notEqualArrayPairs', () => {
101101
makeBlock(assert.deepStrictEqual, arrayPair[0], arrayPair[1]),
102102
assert.AssertionError
103103
);
104-
// TODO(puskin94): remove emitWarning override once the partialDeepStrictEqual method is not experimental anymore
105-
// Suppress warnings, necessary otherwise the tools/pseudo-tty.py runner will fail
106-
const originalEmitWarning = process.emitWarning;
107-
process.emitWarning = () => {};
108104
assert.throws(
109105
makeBlock(assert.partialDeepStrictEqual, arrayPair[0], arrayPair[1]),
110106
assert.AssertionError
111107
);
112-
process.emitWarning = originalEmitWarning; // Restore original process.emitWarning
113108
});
114109
}
115110
});

Diff for: test/pseudo-tty/test-assert-colors.js

-1
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;

Diff for: test/pseudo-tty/test-assert-no-color.js

-1
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)