Skip to content

Commit

Permalink
test: use const and strictEqual in test-os-homedir-no-envvar
Browse files Browse the repository at this point in the history
PR-URL: #9899
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
codeVana authored and addaleax committed Dec 8, 2016
1 parent 62f5a0b commit 6d4f270
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions test/parallel/test-os-homedir-no-envvar.js
Original file line number Diff line number Diff line change
@@ -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
});

Expand Down

0 comments on commit 6d4f270

Please sign in to comment.