Skip to content

Commit

Permalink
test: allow running with NODE_PENDING_DEPRECATION
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
addaleax authored and rvagg committed Aug 16, 2018
1 parent 3d38bab commit 21cdb73
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/parallel/test-pending-deprecation.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ switch (process.argv[2]) {
break;
default:
// Verify that the flag is off by default.
assert.strictEqual(config.pendingDeprecation, undefined);
const envvar = process.env.NODE_PENDING_DEPRECATION;
assert.strictEqual(config.pendingDeprecation, envvar && envvar[0] === '1');

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

0 comments on commit 21cdb73

Please sign in to comment.