donobu 2.23.3 → 2.23.4
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
|
+
1259
|
|
@@ -29,12 +29,6 @@ function formatDuration(ms) {
|
|
|
29
29
|
return `${minutes}m ${remainingSeconds}s`;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
// Function to format date in a readable way
|
|
33
|
-
function formatDate(dateString) {
|
|
34
|
-
const date = new Date(dateString);
|
|
35
|
-
return date.toLocaleString();
|
|
36
|
-
}
|
|
37
|
-
|
|
38
32
|
// Read the JSON data from file or stdin
|
|
39
33
|
function readInput() {
|
|
40
34
|
const args = process.argv.slice(2);
|
|
@@ -47,7 +41,7 @@ function readInput() {
|
|
|
47
41
|
|
|
48
42
|
// Process JSON and create markdown
|
|
49
43
|
function generateMarkdown(jsonData) {
|
|
50
|
-
const { suites
|
|
44
|
+
const { suites } = jsonData;
|
|
51
45
|
|
|
52
46
|
// Count self-healed tests
|
|
53
47
|
let selfHealedCount = 0;
|
|
@@ -137,8 +131,13 @@ function generateMarkdown(jsonData) {
|
|
|
137
131
|
totalInterrupted += interrupted;
|
|
138
132
|
totalSelfHealed += selfHealed;
|
|
139
133
|
totalDuration += fileDuration;
|
|
134
|
+
const anchor = suite.file
|
|
135
|
+
.replace(/[^\w\s-]/g, '') // remove non-alphanumeric
|
|
136
|
+
.trim()
|
|
137
|
+
.replace(/\s+/g, '-') // spaces to dashes
|
|
138
|
+
.toLowerCase();
|
|
140
139
|
|
|
141
|
-
markdown += `| ${suite.file} | ${passed ? passed + ' ✅' : ''} | ${selfHealed ? selfHealed + ' ❤️🩹' : ''} | ${failed ? failed + ' ❌' : ''} | ${timedOut ? timedOut + ' ⏰' : ''} | ${skipped ? skipped + ' ⏭️' : ''} | ${interrupted ? interrupted + ' ⚡' : ''} | ${formatDuration(fileDuration)} |\n`;
|
|
140
|
+
markdown += `| [${suite.file}](#${anchor}) | ${passed ? passed + ' ✅' : ''} | ${selfHealed ? selfHealed + ' ❤️🩹' : ''} | ${failed ? failed + ' ❌' : ''} | ${timedOut ? timedOut + ' ⏰' : ''} | ${skipped ? skipped + ' ⏭️' : ''} | ${interrupted ? interrupted + ' ⚡' : ''} | ${formatDuration(fileDuration)} |\n`;
|
|
142
141
|
});
|
|
143
142
|
|
|
144
143
|
// Add totals row
|
|
@@ -148,7 +147,7 @@ function generateMarkdown(jsonData) {
|
|
|
148
147
|
|
|
149
148
|
// Generate test details sections
|
|
150
149
|
suites.forEach((suite) => {
|
|
151
|
-
const fileName = suite.file
|
|
150
|
+
const fileName = suite.file;
|
|
152
151
|
markdown += `## ${fileName}\n\n`;
|
|
153
152
|
|
|
154
153
|
suite.specs.forEach((spec) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
1259
|
|
@@ -29,12 +29,6 @@ function formatDuration(ms) {
|
|
|
29
29
|
return `${minutes}m ${remainingSeconds}s`;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
// Function to format date in a readable way
|
|
33
|
-
function formatDate(dateString) {
|
|
34
|
-
const date = new Date(dateString);
|
|
35
|
-
return date.toLocaleString();
|
|
36
|
-
}
|
|
37
|
-
|
|
38
32
|
// Read the JSON data from file or stdin
|
|
39
33
|
function readInput() {
|
|
40
34
|
const args = process.argv.slice(2);
|
|
@@ -47,7 +41,7 @@ function readInput() {
|
|
|
47
41
|
|
|
48
42
|
// Process JSON and create markdown
|
|
49
43
|
function generateMarkdown(jsonData) {
|
|
50
|
-
const { suites
|
|
44
|
+
const { suites } = jsonData;
|
|
51
45
|
|
|
52
46
|
// Count self-healed tests
|
|
53
47
|
let selfHealedCount = 0;
|
|
@@ -137,8 +131,13 @@ function generateMarkdown(jsonData) {
|
|
|
137
131
|
totalInterrupted += interrupted;
|
|
138
132
|
totalSelfHealed += selfHealed;
|
|
139
133
|
totalDuration += fileDuration;
|
|
134
|
+
const anchor = suite.file
|
|
135
|
+
.replace(/[^\w\s-]/g, '') // remove non-alphanumeric
|
|
136
|
+
.trim()
|
|
137
|
+
.replace(/\s+/g, '-') // spaces to dashes
|
|
138
|
+
.toLowerCase();
|
|
140
139
|
|
|
141
|
-
markdown += `| ${suite.file} | ${passed ? passed + ' ✅' : ''} | ${selfHealed ? selfHealed + ' ❤️🩹' : ''} | ${failed ? failed + ' ❌' : ''} | ${timedOut ? timedOut + ' ⏰' : ''} | ${skipped ? skipped + ' ⏭️' : ''} | ${interrupted ? interrupted + ' ⚡' : ''} | ${formatDuration(fileDuration)} |\n`;
|
|
140
|
+
markdown += `| [${suite.file}](#${anchor}) | ${passed ? passed + ' ✅' : ''} | ${selfHealed ? selfHealed + ' ❤️🩹' : ''} | ${failed ? failed + ' ❌' : ''} | ${timedOut ? timedOut + ' ⏰' : ''} | ${skipped ? skipped + ' ⏭️' : ''} | ${interrupted ? interrupted + ' ⚡' : ''} | ${formatDuration(fileDuration)} |\n`;
|
|
142
141
|
});
|
|
143
142
|
|
|
144
143
|
// Add totals row
|
|
@@ -148,7 +147,7 @@ function generateMarkdown(jsonData) {
|
|
|
148
147
|
|
|
149
148
|
// Generate test details sections
|
|
150
149
|
suites.forEach((suite) => {
|
|
151
|
-
const fileName = suite.file
|
|
150
|
+
const fileName = suite.file;
|
|
152
151
|
markdown += `## ${fileName}\n\n`;
|
|
153
152
|
|
|
154
153
|
suite.specs.forEach((spec) => {
|