@@ -29,10 +29,15 @@ export function print_lines({ report, context }: Report, params: CliArguments, {
2929 if ( report . min_line_coverage . ok ) {
3030 output . push ( `${ styleText ( [ 'bold' , 'green' ] , 'Success' ) } : total line coverage is ${ percentage ( report . min_line_coverage . actual ) } ` )
3131 } else {
32+ let { actual, expected } = report . min_line_coverage
3233 output . push (
33- `${ styleText ( [ 'bold' , 'red' ] , 'Failed' ) } : line coverage is ${ percentage (
34- report . min_line_coverage . actual ,
35- ) } % which is lower than the threshold of ${ report . min_line_coverage . expected } `,
34+ `${ styleText ( [ 'bold' , 'red' ] , 'Failed' ) } : line coverage is ${ percentage ( actual ) } % which is lower than the threshold of ${ expected } ` ,
35+ )
36+ let lines_to_cover = expected * context . coverage . total_lines - context . coverage . covered_lines
37+ output . push (
38+ `Tip: cover ${ Math . ceil ( lines_to_cover ) } more ${ lines_to_cover === 1 ? 'line' : 'lines' } to meet the threshold of ${ percentage (
39+ expected ,
40+ ) } `,
3641 )
3742 }
3843
@@ -60,6 +65,9 @@ export function print_lines({ report, context }: Report, params: CliArguments, {
6065 print_width = print_width ?? 80
6166 let min_file_line_coverage = report . min_file_line_coverage . expected
6267
68+ // Show empty line between report header and chunks output
69+ output . push ( )
70+
6371 for ( let sheet of context . coverage . coverage_per_stylesheet . sort ( ( a , b ) => a . line_coverage_ratio - b . line_coverage_ratio ) ) {
6472 if (
6573 ( sheet . line_coverage_ratio !== 1 && params [ 'show-uncovered' ] === 'all' ) ||
0 commit comments