@@ -22,16 +22,21 @@ function findCoverageFileForPid(pid) {
2222}
2323
2424function getTapCoverageFixtureReport ( ) {
25+ /* eslint-disable max-len */
2526 const report = [
2627 '# start of coverage report' ,
27- '# file | line % | branch % | funcs % | uncovered lines' ,
28- '# test/fixtures/test-runner/coverage.js | 78.65 | 38.46 | 60.00 | 12, ' +
29- '13, 16, 17, 18, 19, 20, 21, 22, 27, 39, 43, 44, 61, 62, 66, 67, 71, 72' ,
30- '# test/fixtures/test-runner/invalid-tap.js | 100.00 | 100.00 | 100.00 | ' ,
31- '# test/fixtures/v8-coverage/throw.js | 71.43 | 50.00 | 100.00 | 5, 6' ,
32- '# all files | 78.35 | 43.75 | 60.00 |' ,
28+ '# -------------------------------------------------------------------------------------------------------------------' ,
29+ '# file | line % | branch % | funcs % | uncovered lines' ,
30+ '# -------------------------------------------------------------------------------------------------------------------' ,
31+ '# test/fixtures/test-runner/coverage.js | 78.65 | 38.46 | 60.00 | 12-13 16-22 27 39 43-44 61-62 66-67 71-72' ,
32+ '# test/fixtures/test-runner/invalid-tap.js | 100.00 | 100.00 | 100.00 | ' ,
33+ '# test/fixtures/v8-coverage/throw.js | 71.43 | 50.00 | 100.00 | 5-6' ,
34+ '# -------------------------------------------------------------------------------------------------------------------' ,
35+ '# all files | 78.35 | 43.75 | 60.00 |' ,
36+ '# -------------------------------------------------------------------------------------------------------------------' ,
3337 '# end of coverage report' ,
3438 ] . join ( '\n' ) ;
39+ /* eslint-enable max-len */
3540
3641 if ( common . isWindows ) {
3742 return report . replaceAll ( '/' , '\\' ) ;
@@ -88,7 +93,6 @@ test('test tap coverage reporter', skipIfNoInspector, async (t) => {
8893 const options = { env : { ...process . env , NODE_V8_COVERAGE : tmpdir . path } } ;
8994 const result = spawnSync ( process . execPath , args , options ) ;
9095 const report = getTapCoverageFixtureReport ( ) ;
91-
9296 assert ( result . stdout . toString ( ) . includes ( report ) ) ;
9397 assert . strictEqual ( result . stderr . toString ( ) , '' ) ;
9498 assert . strictEqual ( result . status , 0 ) ;
@@ -152,16 +156,16 @@ test('single process coverage is the same with --test', skipIfNoInspector, () =>
152156test ( 'coverage is combined for multiple processes' , skipIfNoInspector , ( ) => {
153157 let report = [
154158 '# start of coverage report' ,
155- '# file | line % | branch % | funcs % | uncovered lines ' ,
156- '# common.js | 89.86 | ' +
157- '62.50 | 100.00 | 8, 13, 14, 18, 34, 35, 53 ' ,
158- '# first.test. js | 83.33 | ' +
159- '100.00 | 50.00 | 5, 6' ,
160- '# second.test.js | 100.00 ' +
161- '| 100.00 | 100.00 | ' ,
162- '# third.test.js | 100.00 | ' +
163- '100.00 | 100.00 | ' ,
164- '# all files | 92.11 | 72.73 | 88.89 | ' ,
159+ '# ------------------------------------------------------------------- ' ,
160+ '# file | line % | branch % | funcs % | uncovered lines' ,
161+ '# ------------------------------------------------------------------- ' ,
162+ '# common. js | 89.86 | 62.50 | 100.00 | 8 13-14 18 34-35 53' ,
163+ '# first.test.js | 83.33 | 100.00 | 50.00 | 5- 6' ,
164+ '# second.test.js | 100.00 | 100.00 | 100.00 | ' ,
165+ '# third.test.js | 100.00 | 100.00 | 100.00 | ' ,
166+ '# -------------------------------------------------------------------' ,
167+ '# all files | 92.11 | 72.73 | 88.89 | ' ,
168+ '# ------------------------------------------------------------------- ' ,
165169 '# end of coverage report' ,
166170 ] . join ( '\n' ) ;
167171
0 commit comments