diff --git a/test/parallel/test-process-env.js b/test/parallel/test-process-env.js index 69379f60061985..60f4d6f4faf13b 100644 --- a/test/parallel/test-process-env.js +++ b/test/parallel/test-process-env.js @@ -26,12 +26,12 @@ const assert = require('assert'); // changes in environment should be visible to child processes if (process.argv[2] === 'you-are-the-child') { - assert.strictEqual(false, 'NODE_PROCESS_ENV_DELETED' in process.env); - assert.strictEqual('42', process.env.NODE_PROCESS_ENV); - assert.strictEqual('asdf', process.env.hasOwnProperty); + assert.strictEqual('NODE_PROCESS_ENV_DELETED' in process.env, false); + assert.strictEqual(process.env.NODE_PROCESS_ENV, '42'); + assert.strictEqual(process.env.hasOwnProperty, 'asdf'); const hasOwnProperty = Object.prototype.hasOwnProperty; const has = hasOwnProperty.call(process.env, 'hasOwnProperty'); - assert.strictEqual(true, has); + assert.strictEqual(has, true); process.exit(0); } @@ -41,18 +41,18 @@ if (process.argv[2] === 'you-are-the-child') { assert.strictEqual(Object.prototype.hasOwnProperty, process.env.hasOwnProperty); const has = process.env.hasOwnProperty('hasOwnProperty'); - assert.strictEqual(false, has); + assert.strictEqual(has, false); process.env.hasOwnProperty = 'asdf'; process.env.NODE_PROCESS_ENV = 42; - assert.strictEqual('42', process.env.NODE_PROCESS_ENV); + assert.strictEqual(process.env.NODE_PROCESS_ENV, '42'); process.env.NODE_PROCESS_ENV_DELETED = 42; - assert.strictEqual(true, 'NODE_PROCESS_ENV_DELETED' in process.env); + assert.strictEqual('NODE_PROCESS_ENV_DELETED' in process.env, true); delete process.env.NODE_PROCESS_ENV_DELETED; - assert.strictEqual(false, 'NODE_PROCESS_ENV_DELETED' in process.env); + assert.strictEqual('NODE_PROCESS_ENV_DELETED' in process.env, false); const child = spawn(process.argv[0], [process.argv[1], 'you-are-the-child']); child.stdout.on('data', function(data) { console.log(data.toString()); });