Skip to content

Commit 6d4f270

Browse files
codeVanaaddaleax
authored andcommitted
test: use const and strictEqual in test-os-homedir-no-envvar
PR-URL: #9899 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 62f5a0b commit 6d4f270

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

‎test/parallel/test-os-homedir-no-envvar.js‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
'use strict';
2-
varcommon=require('../common');
3-
varassert=require('assert');
4-
varcp=require('child_process');
5-
varos=require('os');
6-
varpath=require('path');
2+
constcommon=require('../common');
3+
constassert=require('assert');
4+
constcp=require('child_process');
5+
constos=require('os');
6+
constpath=require('path');
77

88

99
if(process.argv[2]==='child'){
1010
if(common.isWindows)
11-
assert.equal(process.env.USERPROFILE,undefined);
11+
assert.strictEqual(process.env.USERPROFILE,undefined);
1212
else
13-
assert.equal(process.env.HOME,undefined);
13+
assert.strictEqual(process.env.HOME,undefined);
1414

15-
varhome=os.homedir();
15+
consthome=os.homedir();
1616

17-
assert.ok(typeofhome==='string');
18-
assert.ok(home.indexOf(path.sep)!==-1);
17+
assert.strictEqual(typeofhome,'string');
18+
assert(home.includes(path.sep));
1919
}else{
2020
if(common.isWindows)
2121
deleteprocess.env.USERPROFILE;
2222
else
2323
deleteprocess.env.HOME;
2424

25-
varchild=cp.spawnSync(process.execPath,[__filename,'child'],{
25+
constchild=cp.spawnSync(process.execPath,[__filename,'child'],{
2626
env: process.env
2727
});
2828

0 commit comments

Comments
(0)