@@ -215,12 +215,12 @@ if (cluster.isMaster) {
215215
216216 // Calculate and format the data for displaying
217217 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 ) ;
222222 var pct = Math . ceil ( ( ( totalPaths - paths . length ) / totalPaths ) * 100 ) ;
223- pct = padString ( pct , 3 , ' ' ) ;
223+ pct = ` ${ pct } ` . padStart ( 3 ) ;
224224
225225 var line = `[${ mins } :${ secs } |%${ pct } |+${ passed } |-${ failed } ]: ${ curPath } ` ;
226226
@@ -233,13 +233,6 @@ if (cluster.isMaster) {
233233
234234 outFn ( line ) ;
235235 }
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- }
243236} else {
244237 // Worker
245238
0 commit comments