Skip to content

Commit a455006

Browse files
committed
test: allow running with NODE_PENDING_DEPRECATION
Make the test for pending deprecations work when the env var is set during the whole test suite run. PR-URL: #18991 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Сковорода Никита Андреевич <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Matheus Marchini <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent 4471369 commit a455006

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/parallel/test-pending-deprecation.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ switch (process.argv[2]) {
2525
break;
2626
default:
2727
// Verify that the flag is off by default.
28-
assert.strictEqual(config.pendingDeprecation, undefined);
28+
const envvar = process.env.NODE_PENDING_DEPRECATION;
29+
assert.strictEqual(config.pendingDeprecation, envvar && envvar[0] === '1');
2930

3031
// Test the --pending-deprecation command line switch.
3132
fork(__filename, ['switch'], {

0 commit comments

Comments
 (0)