diff --git a/test/parallel/test-pending-deprecation.js b/test/parallel/test-pending-deprecation.js index 9b1fd5addfa0c6..f8b4ec8e5b7b94 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'], {