From 6d4f270f2f056382693a6301b82ef395e221cc3e Mon Sep 17 00:00:00 2001 From: CodeVana Date: Thu, 1 Dec 2016 08:09:01 -0800 Subject: [PATCH] test: use const and strictEqual in test-os-homedir-no-envvar PR-URL: https://github.com/nodejs/node/pull/9899 Reviewed-By: James M Snell Reviewed-By: Colin Ihrig --- test/parallel/test-os-homedir-no-envvar.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/test/parallel/test-os-homedir-no-envvar.js b/test/parallel/test-os-homedir-no-envvar.js index cb4be4e6efcd4e..94d8ab5a08fa14 100644 --- a/test/parallel/test-os-homedir-no-envvar.js +++ b/test/parallel/test-os-homedir-no-envvar.js @@ -1,28 +1,28 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); -var cp = require('child_process'); -var os = require('os'); -var path = require('path'); +const common = require('../common'); +const assert = require('assert'); +const cp = require('child_process'); +const os = require('os'); +const path = require('path'); if (process.argv[2] === 'child') { if (common.isWindows) - assert.equal(process.env.USERPROFILE, undefined); + assert.strictEqual(process.env.USERPROFILE, undefined); else - assert.equal(process.env.HOME, undefined); + assert.strictEqual(process.env.HOME, undefined); - var home = os.homedir(); + const home = os.homedir(); - assert.ok(typeof home === 'string'); - assert.ok(home.indexOf(path.sep) !== -1); + assert.strictEqual(typeof home, 'string'); + assert(home.includes(path.sep)); } else { if (common.isWindows) delete process.env.USERPROFILE; else delete process.env.HOME; - var child = cp.spawnSync(process.execPath, [__filename, 'child'], { + const child = cp.spawnSync(process.execPath, [__filename, 'child'], { env: process.env });