Skip to content

Commit

Permalink
Fixed the test with const and strictEqual
Browse files Browse the repository at this point in the history
  • Loading branch information
codeVana authored and Trott committed Dec 7, 2016
1 parent e4b88d1 commit d579974
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 d579974

Please sign in to comment.