@testomatio/reporter 0.8.0-beta.1 → 0.8.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/pipe/github.js +3 -4
- package/package.json +1 -1
package/lib/pipe/github.js
CHANGED
|
@@ -27,7 +27,7 @@ class GitHubPipe {
|
|
|
27
27
|
|
|
28
28
|
addTest(test) {
|
|
29
29
|
if (!this.isEnabled) return;
|
|
30
|
-
|
|
30
|
+
|
|
31
31
|
const index = this.tests.findIndex(t => isSameTest(t, test))
|
|
32
32
|
// update if they were already added
|
|
33
33
|
if (index >= 0) {
|
|
@@ -105,16 +105,15 @@ class GitHubPipe {
|
|
|
105
105
|
let body = summary;
|
|
106
106
|
|
|
107
107
|
if (failures.length) {
|
|
108
|
-
body +=
|
|
109
|
-
|
|
108
|
+
body += `<details>\n<summary>### 🟥 Failures (${failures.length})</summary>\n${failures.join('\n')} </details>`;
|
|
110
109
|
}
|
|
110
|
+
|
|
111
111
|
if (failures.length > 20) {
|
|
112
112
|
body += "\n> Notice\n> Only first 20 failures shown*"
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
if (this.tests.length > 0) {
|
|
116
116
|
body += "\n### 🐢 Slowest Tests\n\n"
|
|
117
|
-
|
|
118
117
|
body += this.tests.sort((a, b) => b?.run_time - a?.run_time).slice(0, 5).map(t => {
|
|
119
118
|
return `* ${fullName(t)} (${parseFloat(t.run_time).toFixed(2)}ms)`
|
|
120
119
|
}).join('\n')
|