summaryrefslogtreecommitdiff
path: root/test/parallel/test-pending-deprecation.js
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2018-02-25 23:09:29 +0100
committerAnna Henningsen <anna@addaleax.net>2018-03-02 10:56:08 +0000
commit67b7d540413614b97e107fa92e9f3989d8ab0b22 (patch)
tree3c093127beef17a79e8f8bc3bd75ea8df66cc071 /test/parallel/test-pending-deprecation.js
parentd1bc6f0780c272cfea520c5df66fc4edb7122841 (diff)
downloadandroid-node-v8-67b7d540413614b97e107fa92e9f3989d8ab0b22.tar.gz
android-node-v8-67b7d540413614b97e107fa92e9f3989d8ab0b22.tar.bz2
android-node-v8-67b7d540413614b97e107fa92e9f3989d8ab0b22.zip
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: https://github.com/nodejs/node/pull/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>
Diffstat (limited to 'test/parallel/test-pending-deprecation.js')
-rw-r--r--test/parallel/test-pending-deprecation.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/parallel/test-pending-deprecation.js b/test/parallel/test-pending-deprecation.js
index 9b1fd5addf..f8b4ec8e5b 100644
--- a/test/parallel/test-pending-deprecation.js
+++ b/test/parallel/test-pending-deprecation.js
@@ -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'], {