File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -148,13 +148,11 @@ const trailingTests = [
148148 ] ,
149149] ;
150150const failures = [ ] ;
151- trailingTests . forEach ( ( test ) => {
152- const parse = test [ 0 ] ;
151+ for ( const [ parse , testList ] of trailingTests ) {
153152 const os = parse === path . win32 . parse ? 'win32' : 'posix' ;
154- test [ 1 ] . forEach ( ( test ) => {
155- const actual = parse ( test [ 0 ] ) ;
156- const expected = test [ 1 ] ;
157- const message = `path.${ os } .parse(${ JSON . stringify ( test [ 0 ] ) } )\n expect=${
153+ for ( const [ input , expected ] of testList ) {
154+ const actual = parse ( input ) ;
155+ const message = `path.${ os } .parse(${ JSON . stringify ( input ) } )\n expect=${
158156 JSON . stringify ( expected ) } \n actual=${ JSON . stringify ( actual ) } `;
159157 const actualKeys = Object . keys ( actual ) ;
160158 const expectedKeys = Object . keys ( expected ) ;
@@ -170,8 +168,8 @@ trailingTests.forEach((test) => {
170168 }
171169 if ( failed )
172170 failures . push ( `\n${ message } ` ) ;
173- } ) ;
174- } ) ;
171+ }
172+ }
175173assert . strictEqual ( failures . length , 0 , failures . join ( '' ) ) ;
176174
177175function checkErrors ( path ) {
You can’t perform that action at this time.
0 commit comments