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 <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
addaleax committed Mar 5, 2018
1 parent 4471369 commit a455006
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/parallel/test-pending-deprecation.js
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 a455006

Please sign in to comment.