Skip to content

Commit 6c3fb80

Browse files
fix coverage report
1 parent 04ee452 commit 6c3fb80

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

__tests__/__snapshots__/comment.test.ts.snap

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports[`comment tests buildComment when hiding coverage reports when hiding unchanged when all results in one then return as expected 1`] = `"<h2>Code Coverage</h2><table><tbody>[object Object][object Object][object Object]</tbody></table>"`;
3+
exports[`comment tests buildComment when hiding coverage reports when hiding unchanged when all results in one then return as expected 1`] = `"<h2>Code Coverage</h2><table><tbody><tr><th>app diff -</th><th>50.00%</th><th>❌ ▾ -25.00%</th></tr><tr><th>app diff +</th><th>50.00%</th><th>✅ ▴ +25.00%</th></tr><tr><th>app diff null</th><th>unknown%</th></tr></tbody></table>"`;
44

5-
exports[`comment tests buildComment when hiding coverage reports when hiding unchanged when result coverage is undefined then unknown diff in code coverage comment 1`] = `"<h2>Code Coverage</h2><table><tbody>[object Object]</tbody></table>"`;
5+
exports[`comment tests buildComment when hiding coverage reports when hiding unchanged when result coverage is undefined then unknown diff in code coverage comment 1`] = `"<h2>Code Coverage</h2><table><tbody><tr><th>app A</th><th>unknown%</th></tr></tbody></table>"`;
66

77
exports[`comment tests buildComment when hiding coverage reports when hiding unchanged when result diff is 0 then no code coverage comment 1`] = `"<h2>Code Coverage</h2><table><tbody></tbody></table>"`;
88

9-
exports[`comment tests buildComment when hiding coverage reports when hiding unchanged when result diff is negative then negative diff in code coverage comment 1`] = `"<h2>Code Coverage</h2><table><tbody>[object Object]</tbody></table>"`;
9+
exports[`comment tests buildComment when hiding coverage reports when hiding unchanged when result diff is negative then negative diff in code coverage comment 1`] = `"<h2>Code Coverage</h2><table><tbody><tr><th>app A</th><th>50.00%</th><th>❌ ▾ -25.00%</th></tr></tbody></table>"`;
1010

11-
exports[`comment tests buildComment when hiding coverage reports when hiding unchanged when result diff is positive then positive diff in code coverage comment 1`] = `"<h2>Code Coverage</h2><table><tbody>[object Object]</tbody></table>"`;
11+
exports[`comment tests buildComment when hiding coverage reports when hiding unchanged when result diff is positive then positive diff in code coverage comment 1`] = `"<h2>Code Coverage</h2><table><tbody><tr><th>app A</th><th>50.00%</th><th>✅ ▴ +25.00%</th></tr></tbody></table>"`;
1212

13-
exports[`comment tests buildComment when hiding coverage reports when not hiding unchanged when all results in one then return as expected 1`] = `"<h2>Code Coverage</h2><table><tbody>[object Object][object Object][object Object][object Object]</tbody></table>"`;
13+
exports[`comment tests buildComment when hiding coverage reports when not hiding unchanged when all results in one then return as expected 1`] = `"<h2>Code Coverage</h2><table><tbody><tr><th>app diff 0</th><th>50.00%</th><th>✅ 0.00%</th></tr><tr><th>app diff -</th><th>50.00%</th><th>❌ ▾ -25.00%</th></tr><tr><th>app diff +</th><th>50.00%</th><th>✅ ▴ +25.00%</th></tr><tr><th>app diff null</th><th>unknown%</th></tr></tbody></table>"`;
1414

15-
exports[`comment tests buildComment when hiding coverage reports when not hiding unchanged when result coverage is undefined then unknown diff in code coverage comment 1`] = `"<h2>Code Coverage</h2><table><tbody>[object Object]</tbody></table>"`;
15+
exports[`comment tests buildComment when hiding coverage reports when not hiding unchanged when result coverage is undefined then unknown diff in code coverage comment 1`] = `"<h2>Code Coverage</h2><table><tbody><tr><th>app A</th><th>unknown%</th></tr></tbody></table>"`;
1616

17-
exports[`comment tests buildComment when hiding coverage reports when not hiding unchanged when result diff is 0 then 0 diff in code coverage comment 1`] = `"<h2>Code Coverage</h2><table><tbody>[object Object]</tbody></table>"`;
17+
exports[`comment tests buildComment when hiding coverage reports when not hiding unchanged when result diff is 0 then 0 diff in code coverage comment 1`] = `"<h2>Code Coverage</h2><table><tbody><tr><th>app A</th><th>50.00%</th><th>✅ 0.00%</th></tr></tbody></table>"`;
1818

19-
exports[`comment tests buildComment when hiding coverage reports when not hiding unchanged when result diff is negative then negative diff in code coverage comment 1`] = `"<h2>Code Coverage</h2><table><tbody>[object Object]</tbody></table>"`;
19+
exports[`comment tests buildComment when hiding coverage reports when not hiding unchanged when result diff is negative then negative diff in code coverage comment 1`] = `"<h2>Code Coverage</h2><table><tbody><tr><th>app A</th><th>50.00%</th><th>❌ ▾ -25.00%</th></tr></tbody></table>"`;
2020

21-
exports[`comment tests buildComment when hiding coverage reports when not hiding unchanged when result diff is positive then positive diff in code coverage comment 1`] = `"<h2>Code Coverage</h2><table><tbody>[object Object]</tbody></table>"`;
21+
exports[`comment tests buildComment when hiding coverage reports when not hiding unchanged when result diff is positive then positive diff in code coverage comment 1`] = `"<h2>Code Coverage</h2><table><tbody><tr><th>app A</th><th>50.00%</th><th>✅ ▴ +25.00%</th></tr></tbody></table>"`;
2222

2323
exports[`comment tests buildComment when not hiding coverage reports when all results in one then return as expected 1`] = `
2424
"<h2>Code Coverage</h2><table><tbody><tr><th>app diff 0</th><th>50.00%</th><th>✅ 0.00%</th></tr></tbody></table>

src/comment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export const buildComment = ({
7575
.filter(row => row.row !== '')
7676

7777
const tableHtml = hideCoverageReports
78-
? table(tbody(rows.join('')))
78+
? table(tbody(rows.map(row => row.row).join('')))
7979
: rows
8080
.map(
8181
row =>

0 commit comments

Comments
 (0)