Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: allow running with NODE_PENDING_DEPRECATION #18991

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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');
Copy link
Member

@devsnek devsnek Feb 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't this fail if the flag isn't passed undefined === false

nvm me just failing at boolean logic


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