@@ -16796,7 +16796,16 @@ const getSummary = (data) => {
16796
16796
return '';
16797
16797
}
16798
16798
16799
- return parser.resultObject.testsuites.testsuite[0]['$'];
16799
+ const summary = { errors: 0, failures: 0, skipped: 0, tests: 0, time: 0 };
16800
+ for (const testsuite of parser.resultObject.testsuites.testsuite) {
16801
+ const { errors, failures, skipped, tests, time } = testsuite['$'];
16802
+ summary.errors += +errors;
16803
+ summary.failures += +failures;
16804
+ summary.skipped += +skipped;
16805
+ summary.tests += +tests;
16806
+ summary.time += +time;
16807
+ }
16808
+ return summary;
16800
16809
};
16801
16810
16802
16811
const getTestCases = (data) => {
@@ -16812,7 +16821,7 @@ const getTestCases = (data) => {
16812
16821
return '';
16813
16822
}
16814
16823
16815
- return parser.resultObject.testsuites.testsuite[0]. testcase;
16824
+ return parser.resultObject.testsuites.testsuite.map((t) => t. testcase).flat() ;
16816
16825
};
16817
16826
16818
16827
const getNotSuccessTest = (options) => {
@@ -16853,7 +16862,7 @@ const getNotSuccessTest = (options) => {
16853
16862
const toMarkdown = (summary, options) => {
16854
16863
const { errors, failures, skipped, tests, time } = summary;
16855
16864
const displayTime =
16856
- time > 60 ? `${(time / 60) | 0}m ${time % 60 | 0}s` : `${time}s`;
16865
+ time > 60 ? `${(time / 60) | 0}m ${time % 60 | 0}s` : `${time.toFixed(3) }s`;
16857
16866
const table = `| Tests | Skipped | Failures | Errors | Time |
16858
16867
| ----- | ------- | -------- | -------- | ------------------ |
16859
16868
| ${tests} | ${skipped} :zzz: | ${failures} :x: | ${errors} :fire: | ${displayTime} :stopwatch: |
0 commit comments