Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When a test failed, it'd show an output like this which is hard to look at: ``` 1) c8 merges reports from subprocesses together: AssertionError: expected ',first\n\nsecond\n\n--------------------|----------|----------|----------|----------|-------------------|\nFile | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |\n--------------------|----------|----------|----------|----------|---------- ---------|\nAll files | 94.12 | 73.08 | 0 | 94.12 | |\n bin | 83.72 | 57.14 | 10 0 | 83.72 | |\n c8.js | 83.72 | 57.14 | 100 | 83.72 |... 22,40,41,42,43 |\n lib | 96 .41 | 65.38 | 100 | 96.41 | |\n parse-args.js | 97.47 | 44.44 | 100 | 97.47 | 55,56 |\n r eport.js | 95.45 | 76.47 | 100 | 95.45 | 51,52,53,54 |\n test/fixtures | 95.16 | 89.47 | 0 | 95.16 | |\n async.js | 100 | 100 | 100 | 100 | |\n multiple-spawn.js | 100 | 100 | 100 | 100 | |\n normal.js | 85.71 | 75 | 0 | 85.71 | 14,15,16 |\n subprocess.js | 100 | 87.5 | 100 | 100 | 9 |\n--------------------|----------|----------|----------|----------|---------------- ---|\n,' to include '\n--------------------|----------|----------|----------|----------|-------------------|\nFile | % Stmts | % Branc h | % Funcs | % Lines | Uncovered Line #s |\n--------------------|----------|----------|----------|----------|-------------------|\nAll files | 94.12 | 70.59 | 0 | 94.12 | |\n bin | 83.72 | 57.14 | 100 | 83.72 | |\n c8.js | 83.72 | 57.14 | 100 | 83.72 |... 22,40,41,42,43 |\n lib | 96.41 | 65.38 | 100 | 96.41 | |\n parse-args.js | 97.47 | 44.44 | 100 | 97.47 | 55,56 |\n report.js | 95.45 | 76.47 | 100 | 95.45 | 51,52,53,54 |\n test/fixtures | 95.16 | 83.33 | 0 | 95.16 | |\n async .js | 100 | 100 | 100 | 100 | |\n multiple-spawn.js | 100 | 100 | 100 | 100 | |\n normal.js | 85.71 | 75 | 0 | 85.71 | 14,15,16 |\n subprocess.js | 100 | 71.43 | 100 | 100 | 9,13 |\n--------------------|----------|----------|----------|----------|-------------------|' at Context.it (test\integration.js:36:36) ``` This commit tries to improve the error message: ``` 1) c8 merges reports from subprocesses together: AssertionError [ERR_ASSERTION]: ',first\n\nsecond\n\n--------------------|----------|----------|----------|----------|-------------------|\nFile ... deepEqual '\n--------------------|----------|----------|----------|----------|-------------------|\nFile | % Stmts | % ... + expected - actual -,first -second - --------------------|----------|----------|----------|----------|-------------------| File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s | --------------------|----------|----------|----------|----------|-------------------| -All files | 94.12 | 73.08 | 0 | 94.12 | | +All files | 94.12 | 70.59 | 0 | 94.12 | | bin | 83.72 | 57.14 | 100 | 83.72 | | c8.js | 83.72 | 57.14 | 100 | 83.72 |... 22,40,41,42,43 | lib | 96.41 | 65.38 | 100 | 96.41 | | parse-args.js | 97.47 | 44.44 | 100 | 97.47 | 55,56 | report.js | 95.45 | 76.47 | 100 | 95.45 | 51,52,53,54 | - test/fixtures | 95.16 | 89.47 | 0 | 95.16 | | + test/fixtures | 95.16 | 83.33 | 0 | 95.16 | | async.js | 100 | 100 | 100 | 100 | | multiple-spawn.js | 100 | 100 | 100 | 100 | | normal.js | 85.71 | 75 | 0 | 85.71 | 14,15,16 | - subprocess.js | 100 | 87.5 | 100 | 100 | 9 | ---------------------|----------|----------|----------|----------|-------------------| -, + subprocess.js | 100 | 71.43 | 100 | 100 | 9,13 | +--------------------|----------|----------|----------|----------|-------------------| at new AssertionError (internal/assert.js:268:11) ```
- Loading branch information