File tree Expand file tree Collapse file tree
src/client/testing/common Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -143,7 +143,8 @@ export class TestsHelper implements ITestsHelper {
143143 folders . sort ( ) ;
144144 const resource = Uri . file ( workspaceFolder ) ;
145145 folders . forEach ( ( dir ) => {
146- dir . split ( path . sep ) . reduce ( ( parentPath , currentName , _index , _values ) => {
146+ let parentPath = '' ; // Accumulator
147+ dir . split ( path . sep ) . forEach ( ( currentName ) => {
147148 let newPath = currentName ;
148149 let parentFolder : TestFolder | undefined ;
149150 if ( parentPath . length > 0 ) {
@@ -175,8 +176,8 @@ export class TestsHelper implements ITestsHelper {
175176 } ) ;
176177 tests . testFolders . push ( testFolder ) ;
177178 }
178- return newPath ;
179- } , '' ) ;
179+ parentPath = newPath ;
180+ } ) ;
180181 } ) ;
181182 }
182183 public parseTestName ( name : string , rootDirectory : string , tests : Tests ) : TestsToRun | undefined {
You can’t perform that action at this time.
0 commit comments