1
1
'use strict' ;
2
- var common = require ( '../common' ) ;
3
- var assert = require ( 'assert' ) ;
2
+ const common = require ( '../common' ) ;
3
+ const assert = require ( 'assert' ) ;
4
4
5
- var returns = 0 ;
5
+ let returns = 0 ;
6
6
7
7
/*
8
8
Spawns 'pwd' with given options, then test
9
9
- whether the exit code equals forCode,
10
10
- optionally whether the stdout result matches forData
11
- (after removing traling whitespace)
11
+ (after removing trailing whitespace)
12
12
*/
13
13
function testCwd ( options , forCode , forData ) {
14
- var data = '' ;
14
+ let data = '' ;
15
15
16
- var child = common . spawnPwd ( options ) ;
16
+ const child = common . spawnPwd ( options ) ;
17
17
18
18
child . stdout . setEncoding ( 'utf8' ) ;
19
19
@@ -46,7 +46,7 @@ if (common.isWindows) {
46
46
// Assume does-not-exist doesn't exist, expect exitCode=-1 and errno=ENOENT
47
47
{
48
48
testCwd ( { cwd : 'does-not-exist' } , - 1 ) . on ( 'error' , common . mustCall ( function ( e ) {
49
- assert . equal ( e . code , 'ENOENT' ) ;
49
+ assert . strictEqual ( e . code , 'ENOENT' ) ;
50
50
} ) ) ;
51
51
}
52
52
@@ -58,7 +58,7 @@ testCwd({cwd: undefined}, 0);
58
58
testCwd ( { cwd : null } , 0 ) ;
59
59
60
60
// Check whether all tests actually returned
61
- assert . notEqual ( 0 , returns ) ;
61
+ assert . notStrictEqual ( returns , 0 ) ;
62
62
process . on ( 'exit' , function ( ) {
63
- assert . equal ( 0 , returns ) ;
63
+ assert . strictEqual ( returns , 0 ) ;
64
64
} ) ;
0 commit comments