@@ -215,12 +215,12 @@ if (cluster.isMaster) {
215
215
216
216
// Calculate and format the data for displaying
217
217
const elapsed = process . hrtime ( startTime ) [ 0 ] ;
218
- const mins = padString ( Math . floor ( elapsed / 60 ) , 2 , '0' ) ;
219
- const secs = padString ( elapsed % 60 , 2 , '0' ) ;
220
- const passed = padString ( successes , 6 , ' ' ) ;
221
- const failed = padString ( failures , 6 , ' ' ) ;
218
+ const mins = ` ${ Math . floor ( elapsed / 60 ) } ` . padStart ( 2 , '0' ) ;
219
+ const secs = ` ${ elapsed % 60 } ` . padStart ( 2 , '0' ) ;
220
+ const passed = ` ${ successes } ` . padStart ( 6 ) ;
221
+ const failed = ` ${ failures } ` . padStart ( 6 ) ;
222
222
var pct = Math . ceil ( ( ( totalPaths - paths . length ) / totalPaths ) * 100 ) ;
223
- pct = padString ( pct , 3 , ' ' ) ;
223
+ pct = ` ${ pct } ` . padStart ( 3 ) ;
224
224
225
225
var line = `[${ mins } :${ secs } |%${ pct } |+${ passed } |-${ failed } ]: ${ curPath } ` ;
226
226
@@ -233,13 +233,6 @@ if (cluster.isMaster) {
233
233
234
234
outFn ( line ) ;
235
235
}
236
-
237
- function padString ( str , len , chr ) {
238
- str = `${ str } ` ;
239
- if ( str . length >= len )
240
- return str ;
241
- return chr . repeat ( len - str . length ) + str ;
242
- }
243
236
} else {
244
237
// Worker
245
238
0 commit comments