fix(coverage): Make output table markdown compatible (#29533)

This changes the format of the table outputted by `deno coverage` to be
markdown compatible.

Related #29532 
Closes #29465
This commit is contained in:
Boye Lillejord-Nygård 2025-06-24 11:27:07 +02:00 committed by GitHub
parent fd352537ce
commit 5b65313d48
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 52 additions and 80 deletions

View file

@ -615,16 +615,13 @@ fn test_summary_reporter() {
output.assert_exit_code(0);
output.assert_matches_text(
"----------------------------------
File | Branch % | Line % |
----------------------------------
bar.ts | 0.0 | 57.1 |
baz/quux.ts | 0.0 | 28.6 |
baz/qux.ts | 100.0 | 100.0 |
foo.ts | 50.0 | 76.9 |
----------------------------------
All files | 40.0 | 61.0 |
----------------------------------
"| File | Branch % | Line % |
| ----------- | -------- | ------ |
| bar.ts | 0.0 | 57.1 |
| baz/quux.ts | 0.0 | 28.6 |
| baz/qux.ts | 100.0 | 100.0 |
| foo.ts | 50.0 | 76.9 |
| All files | 40.0 | 61.0 |
",
);
}
@ -642,14 +639,11 @@ File | Branch % | Line % |
output.assert_exit_code(0);
output.assert_matches_text(
"---------------------------------
File | Branch % | Line % |
---------------------------------
baz/qux.ts | 100.0 | 100.0 |
foo.ts | 50.0 | 76.9 |
---------------------------------
All files | 66.7 | 85.0 |
---------------------------------
"| File | Branch % | Line % |
| ---------- | -------- | ------ |
| baz/qux.ts | 100.0 | 100.0 |
| foo.ts | 50.0 | 76.9 |
| All files | 66.7 | 85.0 |
",
);
}