donobu 2.12.0 → 2.12.1
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
1056
|
|
@@ -8,6 +8,13 @@
|
|
|
8
8
|
|
|
9
9
|
const fs = require('fs');
|
|
10
10
|
|
|
11
|
+
function stripAnsiCodes(str) {
|
|
12
|
+
return str.replace(
|
|
13
|
+
/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,
|
|
14
|
+
'',
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
|
|
11
18
|
// Function to format duration in a readable way
|
|
12
19
|
function formatDuration(ms) {
|
|
13
20
|
if (ms < 1000) {
|
|
@@ -62,9 +69,9 @@ function generateMarkdown(jsonData) {
|
|
|
62
69
|
markdown += `- **Start Time**: ${formatDate(stats.startTime)}\n`;
|
|
63
70
|
markdown += `- **Duration**: ${formatDuration(stats.duration)}\n`;
|
|
64
71
|
markdown += `- **Tests**: ${stats.expected + stats.unexpected}\n`;
|
|
65
|
-
markdown += `- **Passed**: ${stats.expected
|
|
72
|
+
markdown += `- **Passed**: ${stats.expected}\n`;
|
|
66
73
|
markdown += `- **Self-Healed**: ${selfHealedCount}\n`;
|
|
67
|
-
markdown += `- **Failed**: ${stats.unexpected}\n`;
|
|
74
|
+
markdown += `- **Failed**: ${stats.unexpected - selfHealedCount}\n`;
|
|
68
75
|
markdown += `- **Skipped**: ${stats.skipped}\n`;
|
|
69
76
|
markdown += `- **Flaky**: ${stats.flaky}\n\n`;
|
|
70
77
|
|
|
@@ -89,7 +96,7 @@ function generateMarkdown(jsonData) {
|
|
|
89
96
|
const selfHealedChar = '❤️🩹';
|
|
90
97
|
const failChar = '🔴';
|
|
91
98
|
|
|
92
|
-
const passCount = stats.expected
|
|
99
|
+
const passCount = stats.expected;
|
|
93
100
|
const failCount = stats.unexpected - selfHealedCount;
|
|
94
101
|
|
|
95
102
|
const statusBar =
|
|
@@ -193,7 +200,7 @@ function generateMarkdown(jsonData) {
|
|
|
193
200
|
|
|
194
201
|
// Include code snippet if available
|
|
195
202
|
if (result.error.snippet) {
|
|
196
|
-
markdown += `**Code Snippet**:\n
|
|
203
|
+
markdown += `**Code Snippet**:\n\`\`\`\n${stripAnsiCodes(result.error.snippet)}\n\`\`\`\n\n`;
|
|
197
204
|
}
|
|
198
205
|
|
|
199
206
|
markdown += `</details>\n\n`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
1056
|
|
@@ -8,6 +8,13 @@
|
|
|
8
8
|
|
|
9
9
|
const fs = require('fs');
|
|
10
10
|
|
|
11
|
+
function stripAnsiCodes(str) {
|
|
12
|
+
return str.replace(
|
|
13
|
+
/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,
|
|
14
|
+
'',
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
|
|
11
18
|
// Function to format duration in a readable way
|
|
12
19
|
function formatDuration(ms) {
|
|
13
20
|
if (ms < 1000) {
|
|
@@ -62,9 +69,9 @@ function generateMarkdown(jsonData) {
|
|
|
62
69
|
markdown += `- **Start Time**: ${formatDate(stats.startTime)}\n`;
|
|
63
70
|
markdown += `- **Duration**: ${formatDuration(stats.duration)}\n`;
|
|
64
71
|
markdown += `- **Tests**: ${stats.expected + stats.unexpected}\n`;
|
|
65
|
-
markdown += `- **Passed**: ${stats.expected
|
|
72
|
+
markdown += `- **Passed**: ${stats.expected}\n`;
|
|
66
73
|
markdown += `- **Self-Healed**: ${selfHealedCount}\n`;
|
|
67
|
-
markdown += `- **Failed**: ${stats.unexpected}\n`;
|
|
74
|
+
markdown += `- **Failed**: ${stats.unexpected - selfHealedCount}\n`;
|
|
68
75
|
markdown += `- **Skipped**: ${stats.skipped}\n`;
|
|
69
76
|
markdown += `- **Flaky**: ${stats.flaky}\n\n`;
|
|
70
77
|
|
|
@@ -89,7 +96,7 @@ function generateMarkdown(jsonData) {
|
|
|
89
96
|
const selfHealedChar = '❤️🩹';
|
|
90
97
|
const failChar = '🔴';
|
|
91
98
|
|
|
92
|
-
const passCount = stats.expected
|
|
99
|
+
const passCount = stats.expected;
|
|
93
100
|
const failCount = stats.unexpected - selfHealedCount;
|
|
94
101
|
|
|
95
102
|
const statusBar =
|
|
@@ -193,7 +200,7 @@ function generateMarkdown(jsonData) {
|
|
|
193
200
|
|
|
194
201
|
// Include code snippet if available
|
|
195
202
|
if (result.error.snippet) {
|
|
196
|
-
markdown += `**Code Snippet**:\n
|
|
203
|
+
markdown += `**Code Snippet**:\n\`\`\`\n${stripAnsiCodes(result.error.snippet)}\n\`\`\`\n\n`;
|
|
197
204
|
}
|
|
198
205
|
|
|
199
206
|
markdown += `</details>\n\n`;
|