Skip to content

Commit 652cc70

Browse files
authored
feat: add summary to smoketests (#3288)
* feat: add summary to smoketests * chore: add pass fail count
1 parent 1072e38 commit 652cc70

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

.cspell.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@
9191
"Zenitsu",
9292
"eslintcache",
9393
"wagoid",
94-
"Nitin"
94+
"Nitin",
95+
"smoketest"
9596
],
9697
"dictionaries": ["npm", "software-terms"],
9798
"ignorePaths": [

smoketests/index.js

+18-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ const tests = [
1111

1212
(async () => {
1313
let isAllPassed = true;
14+
const passResults = [];
15+
const failResults = [];
1416

1517
for await (const test of tests) {
1618
console.log(`\nRUN ${test.name}`);
@@ -22,13 +24,27 @@ const tests = [
2224
}
2325

2426
if (!isPass) {
25-
console.log(`FAIL ${test.name}`);
27+
const result = `FAIL ${test.name}`;
28+
failResults.push(result);
29+
console.log(result);
2630
isAllPassed = false;
2731
} else {
28-
console.log(`PASS ${test.name}`);
32+
const result = `PASS ${test.name}`;
33+
passResults.push(result);
34+
console.log(result);
2935
}
3036
}
3137

38+
console.log(`\n\nSummary of smoketest run:`);
39+
console.log(`${failResults.length} tests failed, ${passResults.length} tests passed`);
40+
41+
for (const result of failResults) {
42+
console.log(result);
43+
}
44+
for (const result of passResults) {
45+
console.log(result);
46+
}
47+
3248
if (!isAllPassed) {
3349
process.exit(2);
3450
}

0 commit comments

Comments
 (0)