@@ -358,7 +358,7 @@ function getCoverageReport(pad, summary, symbol, color, table) {
358358 }
359359
360360
361- function getCell ( string , width , { pad, truncate, coverage } ) {
361+ function getCell ( string , width , pad , truncate , coverage ) {
362362 if ( ! table ) return string ;
363363
364364 let result = string ;
@@ -374,9 +374,9 @@ function getCoverageReport(pad, summary, symbol, color, table) {
374374
375375 // Head
376376 if ( table ) report += addTableLine ( prefix , tableWidth ) ;
377- report += `${ prefix } ${ getCell ( 'file' , filePadLength , { pad : StringPrototypePadEnd , truncate : truncateEnd } ) } ${ kSeparator } ` +
378- `${ ArrayPrototypeJoin ( ArrayPrototypeMap ( kColumns , ( column , i ) => getCell ( column , columnPadLengths [ i ] , { pad : StringPrototypePadStart } ) ) , kSeparator ) } ${ kSeparator } ` +
379- `${ getCell ( 'uncovered lines' , uncoveredLinesPadLength , { truncate : truncateEnd } ) } \n` ;
377+ report += `${ prefix } ${ getCell ( 'file' , filePadLength , StringPrototypePadEnd , truncateEnd ) } ${ kSeparator } ` +
378+ `${ ArrayPrototypeJoin ( ArrayPrototypeMap ( kColumns , ( column , i ) => getCell ( column , columnPadLengths [ i ] , StringPrototypePadStart ) ) , kSeparator ) } ${ kSeparator } ` +
379+ `${ getCell ( 'uncovered lines' , uncoveredLinesPadLength , false , truncateEnd ) } \n` ;
380380 if ( table ) report += addTableLine ( prefix , tableWidth ) ;
381381
382382 // Body
@@ -392,15 +392,15 @@ function getCoverageReport(pad, summary, symbol, color, table) {
392392 } ) ;
393393 fileCoverage /= kColumnsKeys . length ;
394394
395- report += `${ prefix } ${ getCell ( relativePath , filePadLength , { pad : StringPrototypePadEnd , truncate : truncateStart , coverage : fileCoverage } ) } ${ kSeparator } ` +
396- `${ ArrayPrototypeJoin ( ArrayPrototypeMap ( coverages , ( coverage , j ) => getCell ( NumberPrototypeToFixed ( coverage , 2 ) , columnPadLengths [ j ] , { coverage , pad : StringPrototypePadStart } ) ) , kSeparator ) } ${ kSeparator } ` +
397- `${ getCell ( formatUncoveredLines ( file . uncoveredLineNumbers , table ) , uncoveredLinesPadLength , { truncate : truncateEnd } ) } \n` ;
395+ report += `${ prefix } ${ getCell ( relativePath , filePadLength , StringPrototypePadEnd , truncateStart , fileCoverage ) } ${ kSeparator } ` +
396+ `${ ArrayPrototypeJoin ( ArrayPrototypeMap ( coverages , ( coverage , j ) => getCell ( NumberPrototypeToFixed ( coverage , 2 ) , columnPadLengths [ j ] , StringPrototypePadStart , false , coverage ) ) , kSeparator ) } ${ kSeparator } ` +
397+ `${ getCell ( formatUncoveredLines ( file . uncoveredLineNumbers , table ) , uncoveredLinesPadLength , false , truncateEnd ) } \n` ;
398398 }
399399
400400 // Foot
401401 if ( table ) report += addTableLine ( prefix , tableWidth ) ;
402- report += `${ prefix } ${ getCell ( 'all files' , filePadLength , { pad : StringPrototypePadEnd , truncate : truncateEnd } ) } ${ kSeparator } ` +
403- `${ ArrayPrototypeJoin ( ArrayPrototypeMap ( kColumnsKeys , ( columnKey , j ) => getCell ( NumberPrototypeToFixed ( summary . totals [ columnKey ] , 2 ) , columnPadLengths [ j ] , { coverage : summary . totals [ columnKey ] , pad : StringPrototypePadStart } ) ) , kSeparator ) } |\n` ;
402+ report += `${ prefix } ${ getCell ( 'all files' , filePadLength , StringPrototypePadEnd , truncateEnd ) } ${ kSeparator } ` +
403+ `${ ArrayPrototypeJoin ( ArrayPrototypeMap ( kColumnsKeys , ( columnKey , j ) => getCell ( NumberPrototypeToFixed ( summary . totals [ columnKey ] , 2 ) , columnPadLengths [ j ] , StringPrototypePadStart , false , summary . totals [ columnKey ] ) ) , kSeparator ) } |\n` ;
404404 if ( table ) report += addTableLine ( prefix , tableWidth ) ;
405405
406406 report += `${ prefix } end of coverage report\n` ;
0 commit comments