@@ -575,14 +575,13 @@ namespace Harness {
575575 function filesInFolder ( folder : string ) : string [ ] {
576576 let paths : string [ ] = [ ] ;
577577
578- const files = fs . readdirSync ( folder ) ;
579- for ( let i = 0 ; i < files . length ; i ++ ) {
580- const pathToFile = pathModule . join ( folder , files [ i ] ) ;
578+ for ( const file of fs . readdirSync ( folder ) ) {
579+ const pathToFile = pathModule . join ( folder , file ) ;
581580 const stat = fs . statSync ( pathToFile ) ;
582581 if ( options . recursive && stat . isDirectory ( ) ) {
583582 paths = paths . concat ( filesInFolder ( pathToFile ) ) ;
584583 }
585- else if ( stat . isFile ( ) && ( ! spec || files [ i ] . match ( spec ) ) ) {
584+ else if ( stat . isFile ( ) && ( ! spec || file . match ( spec ) ) ) {
586585 paths . push ( pathToFile ) ;
587586 }
588587 }
@@ -1581,10 +1580,8 @@ namespace Harness {
15811580
15821581 // Preserve legacy behavior
15831582 if ( lastIndexWritten === undefined ) {
1584- for ( let i = 0 ; i < codeLines . length ; i ++ ) {
1585- const currentCodeLine = codeLines [ i ] ;
1586- typeLines += currentCodeLine + "\r\n" ;
1587- typeLines += "No type information for this code." ;
1583+ for ( const codeLine of codeLines ) {
1584+ typeLines += codeLine + "\r\nNo type information for this code." ;
15881585 }
15891586 }
15901587 else {
@@ -1870,8 +1867,7 @@ namespace Harness {
18701867 let currentFileName : any = undefined ;
18711868 let refs : string [ ] = [ ] ;
18721869
1873- for ( let i = 0 ; i < lines . length ; i ++ ) {
1874- const line = lines [ i ] ;
1870+ for ( const line of lines ) {
18751871 const testMetaData = optionRegex . exec ( line ) ;
18761872 if ( testMetaData ) {
18771873 // Comment line, check for global/file @options and record them
0 commit comments