@@ -101,7 +101,7 @@ console.error(interfaces);
101
101
switch ( platform ) {
102
102
case 'linux' :
103
103
{
104
- const filter = function ( e ) { return e . address == '127.0.0.1' ; } ;
104
+ const filter = function ( e ) { return e . address === '127.0.0.1' ; } ;
105
105
const actual = interfaces . lo . filter ( filter ) ;
106
106
const expected = [ { address : '127.0.0.1' , netmask : '255.0.0.0' ,
107
107
mac : '00:00:00:00:00:00' , family : 'IPv4' ,
@@ -111,7 +111,7 @@ switch (platform) {
111
111
}
112
112
case 'win32' :
113
113
{
114
- const filter = function ( e ) { return e . address == '127.0.0.1' ; } ;
114
+ const filter = function ( e ) { return e . address === '127.0.0.1' ; } ;
115
115
const actual = interfaces [ 'Loopback Pseudo-Interface 1' ] . filter ( filter ) ;
116
116
const expected = [ { address : '127.0.0.1' , netmask : '255.0.0.0' ,
117
117
mac : '00:00:00:00:00:00' , family : 'IPv4' ,
@@ -129,17 +129,17 @@ const home = os.homedir();
129
129
130
130
console . log ( 'homedir = ' + home ) ;
131
131
is . string ( home ) ;
132
- assert . ok ( home . indexOf ( path . sep ) !== - 1 ) ;
132
+ assert . ok ( home . includes ( path . sep ) ) ;
133
133
134
134
if ( common . isWindows && process . env . USERPROFILE ) {
135
135
assert . strictEqual ( home , process . env . USERPROFILE ) ;
136
136
delete process . env . USERPROFILE ;
137
- assert . ok ( os . homedir ( ) . indexOf ( path . sep ) !== - 1 ) ;
137
+ assert . ok ( os . homedir ( ) . includes ( path . sep ) ) ;
138
138
process . env . USERPROFILE = home ;
139
139
} else if ( ! common . isWindows && process . env . HOME ) {
140
140
assert . strictEqual ( home , process . env . HOME ) ;
141
141
delete process . env . HOME ;
142
- assert . ok ( os . homedir ( ) . indexOf ( path . sep ) !== - 1 ) ;
142
+ assert . ok ( os . homedir ( ) . includes ( path . sep ) ) ;
143
143
process . env . HOME = home ;
144
144
}
145
145
@@ -157,13 +157,13 @@ if (common.isWindows) {
157
157
} else {
158
158
is . number ( pwd . uid ) ;
159
159
is . number ( pwd . gid ) ;
160
- assert . notStrictEqual ( pwd . shell . indexOf ( path . sep ) , - 1 ) ;
160
+ assert . ok ( pwd . shell . includes ( path . sep ) ) ;
161
161
assert . strictEqual ( pwd . uid , pwdBuf . uid ) ;
162
162
assert . strictEqual ( pwd . gid , pwdBuf . gid ) ;
163
163
assert . strictEqual ( pwd . shell , pwdBuf . shell . toString ( 'utf8' ) ) ;
164
164
}
165
165
166
166
is . string ( pwd . username ) ;
167
- assert . notStrictEqual ( pwd . homedir . indexOf ( path . sep ) , - 1 ) ;
167
+ assert . ok ( pwd . homedir . includes ( path . sep ) ) ;
168
168
assert . strictEqual ( pwd . username , pwdBuf . username . toString ( 'utf8' ) ) ;
169
169
assert . strictEqual ( pwd . homedir , pwdBuf . homedir . toString ( 'utf8' ) ) ;
0 commit comments