@@ -30,13 +30,16 @@ const typeErrorTests = [true, false, 7, null, {}, undefined, [], NaN];
3030function fail ( fn ) {
3131 const args = Array . from ( arguments ) . slice ( 1 ) ;
3232
33- assert . throws ( ( ) => {
34- fn . apply ( null , args ) ;
35- } , { code : 'ERR_INVALID_ARG_TYPE' , name : 'TypeError' } ) ;
33+ assert . throws (
34+ ( ) => {
35+ fn . apply ( null , args ) ;
36+ } ,
37+ { code : 'ERR_INVALID_ARG_TYPE' , name : 'TypeError' }
38+ ) ;
3639}
3740
38- typeErrorTests . forEach ( ( test ) => {
39- [ path . posix , path . win32 ] . forEach ( ( namespace ) => {
41+ for ( const test of typeErrorTests ) {
42+ for ( const namespace of [ path . posix , path . win32 ] ) {
4043 fail ( namespace . join , test ) ;
4144 fail ( namespace . resolve , test ) ;
4245 fail ( namespace . normalize , test ) ;
@@ -52,8 +55,8 @@ typeErrorTests.forEach((test) => {
5255 if ( test !== undefined ) {
5356 fail ( namespace . basename , 'foo' , test ) ;
5457 }
55- } ) ;
56- } ) ;
58+ }
59+ }
5760
5861// path.sep tests
5962// windows
@@ -67,7 +70,5 @@ assert.strictEqual(path.win32.delimiter, ';');
6770// posix
6871assert . strictEqual ( path . posix . delimiter , ':' ) ;
6972
70- if ( common . isWindows )
71- assert . strictEqual ( path , path . win32 ) ;
72- else
73- assert . strictEqual ( path , path . posix ) ;
73+ if ( common . isWindows ) assert . strictEqual ( path , path . win32 ) ;
74+ else assert . strictEqual ( path , path . posix ) ;
0 commit comments