mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-15 22:07:09 +01:00
Fix edge case of one test assembly
This commit is contained in:
parent
3608ee03fd
commit
724497a84c
14 changed files with 65 additions and 6 deletions
|
|
@ -1,4 +1,7 @@
|
||||||

|

|
||||||
|
|Report|Passed|Failed|Skipped|Time|
|
||||||
|
|:---|---:|---:|---:|---:|
|
||||||
|
|fixtures/dart-json.json|1:white_check_mark:|4:x:|1:warning:|4s|
|
||||||
## :x: <a id="user-content-r0" href="#r0">fixtures/dart-json.json</a>
|
## :x: <a id="user-content-r0" href="#r0">fixtures/dart-json.json</a>
|
||||||
**6** tests were completed in **4s** with **1** passed, **4** failed and **1** skipped.
|
**6** tests were completed in **4s** with **1** passed, **4** failed and **1** skipped.
|
||||||
|Test suite|Passed|Failed|Skipped|Time|
|
|Test suite|Passed|Failed|Skipped|Time|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,7 @@
|
||||||

|

|
||||||
|
|Report|Passed|Failed|Skipped|Time|
|
||||||
|
|:---|---:|---:|---:|---:|
|
||||||
|
|DotnetTests.XUnitTests|5:white_check_mark:|5:x:|1:warning:|1s|
|
||||||
## :x: <a id="user-content-r0" href="#r0">DotnetTests.XUnitTests</a>
|
## :x: <a id="user-content-r0" href="#r0">DotnetTests.XUnitTests</a>
|
||||||
**11** tests were completed in **1s** with **5** passed, **5** failed and **1** skipped.
|
**11** tests were completed in **1s** with **5** passed, **5** failed and **1** skipped.
|
||||||
|Test suite|Passed|Failed|Skipped|Time|
|
|Test suite|Passed|Failed|Skipped|Time|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,9 @@
|
||||||

|

|
||||||
|
<details><summary>Expand for details</summary>
|
||||||
|
|
||||||
|
|Report|Passed|Failed|Skipped|Time|
|
||||||
|
|:---|---:|---:|---:|---:|
|
||||||
|
|FluentValidation.Tests|803:white_check_mark:||1:warning:|4s|
|
||||||
## :white_check_mark: <a id="user-content-r0" href="#r0">FluentValidation.Tests</a>
|
## :white_check_mark: <a id="user-content-r0" href="#r0">FluentValidation.Tests</a>
|
||||||
**804** tests were completed in **4s** with **803** passed, **0** failed and **1** skipped.
|
**804** tests were completed in **4s** with **803** passed, **0** failed and **1** skipped.
|
||||||
|Test suite|Passed|Failed|Skipped|Time|
|
|Test suite|Passed|Failed|Skipped|Time|
|
||||||
|
|
@ -1054,4 +1059,5 @@
|
||||||
:white_check_mark: Unexpected_message_check(withoutErrMsg: "bar", errMessages: [])
|
:white_check_mark: Unexpected_message_check(withoutErrMsg: "bar", errMessages: [])
|
||||||
:white_check_mark: Unexpected_severity_check
|
:white_check_mark: Unexpected_severity_check
|
||||||
:white_check_mark: Unexpected_state_check
|
:white_check_mark: Unexpected_state_check
|
||||||
```
|
```
|
||||||
|
</details>
|
||||||
|
|
@ -1,4 +1,7 @@
|
||||||

|

|
||||||
|
|Report|Passed|Failed|Skipped|Time|
|
||||||
|
|:---|---:|---:|---:|---:|
|
||||||
|
|fixtures/jest-junit.xml|1:white_check_mark:|4:x:|1:warning:|1s|
|
||||||
## :x: <a id="user-content-r0" href="#r0">fixtures/jest-junit.xml</a>
|
## :x: <a id="user-content-r0" href="#r0">fixtures/jest-junit.xml</a>
|
||||||
**6** tests were completed in **1s** with **1** passed, **4** failed and **1** skipped.
|
**6** tests were completed in **1s** with **1** passed, **4** failed and **1** skipped.
|
||||||
|Test suite|Passed|Failed|Skipped|Time|
|
|Test suite|Passed|Failed|Skipped|Time|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,7 @@
|
||||||

|

|
||||||
|
|Report|Passed|Failed|Skipped|Time|
|
||||||
|
|:---|---:|---:|---:|---:|
|
||||||
|
|fixtures/external/jest/jest-test-results.xml|4207:white_check_mark:|2:x:|30:warning:|166s|
|
||||||
## :x: <a id="user-content-r0" href="#r0">fixtures/external/jest/jest-test-results.xml</a>
|
## :x: <a id="user-content-r0" href="#r0">fixtures/external/jest/jest-test-results.xml</a>
|
||||||
**4239** tests were completed in **166s** with **4207** passed, **2** failed and **30** skipped.
|
**4239** tests were completed in **166s** with **4207** passed, **2** failed and **30** skipped.
|
||||||
|Test suite|Passed|Failed|Skipped|Time|
|
|Test suite|Passed|Failed|Skipped|Time|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,7 @@
|
||||||

|

|
||||||
|
|Report|Passed|Failed|Skipped|Time|
|
||||||
|
|:---|---:|---:|---:|---:|
|
||||||
|
|fixtures/mocha-json.json|1:white_check_mark:|4:x:|1:warning:|12ms|
|
||||||
## :x: <a id="user-content-r0" href="#r0">fixtures/mocha-json.json</a>
|
## :x: <a id="user-content-r0" href="#r0">fixtures/mocha-json.json</a>
|
||||||
**6** tests were completed in **12ms** with **1** passed, **4** failed and **1** skipped.
|
**6** tests were completed in **12ms** with **1** passed, **4** failed and **1** skipped.
|
||||||
|Test suite|Passed|Failed|Skipped|Time|
|
|Test suite|Passed|Failed|Skipped|Time|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,9 @@
|
||||||

|

|
||||||
|
<details><summary>Expand for details</summary>
|
||||||
|
|
||||||
|
|Report|Passed|Failed|Skipped|Time|
|
||||||
|
|:---|---:|---:|---:|---:|
|
||||||
|
|fixtures/external/mocha/mocha-test-results.json|833:white_check_mark:||6:warning:|6s|
|
||||||
## :white_check_mark: <a id="user-content-r0" href="#r0">fixtures/external/mocha/mocha-test-results.json</a>
|
## :white_check_mark: <a id="user-content-r0" href="#r0">fixtures/external/mocha/mocha-test-results.json</a>
|
||||||
**839** tests were completed in **6s** with **833** passed, **0** failed and **6** skipped.
|
**839** tests were completed in **6s** with **833** passed, **0** failed and **6** skipped.
|
||||||
|Test suite|Passed|Failed|Skipped|Time|
|
|Test suite|Passed|Failed|Skipped|Time|
|
||||||
|
|
@ -1428,4 +1433,5 @@ lib/utils type() when toString on null or undefined stringifies window
|
||||||
:white_check_mark: should recognize null and undefined
|
:white_check_mark: should recognize null and undefined
|
||||||
lib/utils uniqueID()
|
lib/utils uniqueID()
|
||||||
:white_check_mark: should return a non-empty string
|
:white_check_mark: should return a non-empty string
|
||||||
```
|
```
|
||||||
|
</details>
|
||||||
|
|
@ -1,4 +1,7 @@
|
||||||

|

|
||||||
|
|Report|Passed|Failed|Skipped|Time|
|
||||||
|
|:---|---:|---:|---:|---:|
|
||||||
|
|fixtures/external/flutter/provider-test-results.json|268:white_check_mark:|1:x:||0ms|
|
||||||
## :x: <a id="user-content-r0" href="#r0">fixtures/external/flutter/provider-test-results.json</a>
|
## :x: <a id="user-content-r0" href="#r0">fixtures/external/flutter/provider-test-results.json</a>
|
||||||
**269** tests were completed in **0ms** with **268** passed, **1** failed and **0** skipped.
|
**269** tests were completed in **0ms** with **268** passed, **1** failed and **0** skipped.
|
||||||
|Test suite|Passed|Failed|Skipped|Time|
|
|Test suite|Passed|Failed|Skipped|Time|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,7 @@
|
||||||

|

|
||||||
|
|Report|Passed|Failed|Skipped|Time|
|
||||||
|
|:---|---:|---:|---:|---:|
|
||||||
|
|fixtures/external/java/TEST-org.apache.pulsar.AddMissingPatchVersionTest.xml||1:x:|1:warning:|116ms|
|
||||||
## :x: <a id="user-content-r0" href="#r0">fixtures/external/java/TEST-org.apache.pulsar.AddMissingPatchVersionTest.xml</a>
|
## :x: <a id="user-content-r0" href="#r0">fixtures/external/java/TEST-org.apache.pulsar.AddMissingPatchVersionTest.xml</a>
|
||||||
**2** tests were completed in **116ms** with **0** passed, **1** failed and **1** skipped.
|
**2** tests were completed in **116ms** with **0** passed, **1** failed and **1** skipped.
|
||||||
|Test suite|Passed|Failed|Skipped|Time|
|
|Test suite|Passed|Failed|Skipped|Time|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,7 @@
|
||||||

|

|
||||||
|
|Report|Passed|Failed|Skipped|Time|
|
||||||
|
|:---|---:|---:|---:|---:|
|
||||||
|
|fixtures/external/java/pulsar-test-report.xml|793:white_check_mark:|1:x:|14:warning:|2127s|
|
||||||
## :x: <a id="user-content-r0" href="#r0">fixtures/external/java/pulsar-test-report.xml</a>
|
## :x: <a id="user-content-r0" href="#r0">fixtures/external/java/pulsar-test-report.xml</a>
|
||||||
**808** tests were completed in **2127s** with **793** passed, **1** failed and **14** skipped.
|
**808** tests were completed in **2127s** with **793** passed, **1** failed and **14** skipped.
|
||||||
|Test suite|Passed|Failed|Skipped|Time|
|
|Test suite|Passed|Failed|Skipped|Time|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,9 @@
|
||||||

|

|
||||||
|
<details><summary>Expand for details</summary>
|
||||||
|
|
||||||
|
|Report|Passed|Failed|Skipped|Time|
|
||||||
|
|:---|---:|---:|---:|---:|
|
||||||
|
|VanillaCloudStorageClientTest|67:white_check_mark:||12:warning:|1s|
|
||||||
## :white_check_mark: <a id="user-content-r0" href="#r0">VanillaCloudStorageClientTest</a>
|
## :white_check_mark: <a id="user-content-r0" href="#r0">VanillaCloudStorageClientTest</a>
|
||||||
**79** tests were completed in **1s** with **67** passed, **0** failed and **12** skipped.
|
**79** tests were completed in **1s** with **67** passed, **0** failed and **12** skipped.
|
||||||
|Test suite|Passed|Failed|Skipped|Time|
|
|Test suite|Passed|Failed|Skipped|Time|
|
||||||
|
|
@ -133,4 +138,5 @@
|
||||||
:white_check_mark: SerializedXmlCanBeReadBack
|
:white_check_mark: SerializedXmlCanBeReadBack
|
||||||
:white_check_mark: SerializedXmlDoesNotContainNullProperties
|
:white_check_mark: SerializedXmlDoesNotContainNullProperties
|
||||||
:white_check_mark: SerializedXmlDoesNotContainPlaintextData
|
:white_check_mark: SerializedXmlDoesNotContainPlaintextData
|
||||||
```
|
```
|
||||||
|
</details>
|
||||||
10
dist/index.js
generated
vendored
10
dist/index.js
generated
vendored
|
|
@ -1595,7 +1595,12 @@ function getBadge(passed, failed, skipped, options) {
|
||||||
}
|
}
|
||||||
function getTestRunsReport(testRuns, options) {
|
function getTestRunsReport(testRuns, options) {
|
||||||
const sections = [];
|
const sections = [];
|
||||||
if (testRuns.length > 1 || options.onlySummary) {
|
const totalFailed = testRuns.reduce((sum, tr) => sum + tr.failed, 0);
|
||||||
|
if (totalFailed === 0) {
|
||||||
|
sections.push(`<details><summary>Expand for details</summary>`);
|
||||||
|
sections.push(` `);
|
||||||
|
}
|
||||||
|
if (testRuns.length > 0 || options.onlySummary) {
|
||||||
const tableData = testRuns
|
const tableData = testRuns
|
||||||
.filter(tr => tr.passed > 0 || tr.failed > 0 || tr.skipped > 0)
|
.filter(tr => tr.passed > 0 || tr.failed > 0 || tr.skipped > 0)
|
||||||
.map(tr => {
|
.map(tr => {
|
||||||
|
|
@ -1613,6 +1618,9 @@ function getTestRunsReport(testRuns, options) {
|
||||||
const suitesReports = testRuns.map((tr, i) => getSuitesReport(tr, i, options)).flat();
|
const suitesReports = testRuns.map((tr, i) => getSuitesReport(tr, i, options)).flat();
|
||||||
sections.push(...suitesReports);
|
sections.push(...suitesReports);
|
||||||
}
|
}
|
||||||
|
if (totalFailed === 0) {
|
||||||
|
sections.push(`</details>`);
|
||||||
|
}
|
||||||
return sections;
|
return sections;
|
||||||
}
|
}
|
||||||
function getSuitesReport(tr, runIndex, options) {
|
function getSuitesReport(tr, runIndex, options) {
|
||||||
|
|
|
||||||
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
|
|
@ -143,8 +143,13 @@ function getBadge(passed: number, failed: number, skipped: number, options: Repo
|
||||||
|
|
||||||
function getTestRunsReport(testRuns: TestRunResult[], options: ReportOptions): string[] {
|
function getTestRunsReport(testRuns: TestRunResult[], options: ReportOptions): string[] {
|
||||||
const sections: string[] = []
|
const sections: string[] = []
|
||||||
|
const totalFailed = testRuns.reduce((sum, tr) => sum + tr.failed, 0)
|
||||||
|
if (totalFailed === 0) {
|
||||||
|
sections.push(`<details><summary>Expand for details</summary>`)
|
||||||
|
sections.push(` `)
|
||||||
|
}
|
||||||
|
|
||||||
if (testRuns.length > 1 || options.onlySummary) {
|
if (testRuns.length > 0 || options.onlySummary) {
|
||||||
const tableData = testRuns
|
const tableData = testRuns
|
||||||
.filter(tr => tr.passed > 0 || tr.failed > 0 || tr.skipped > 0)
|
.filter(tr => tr.passed > 0 || tr.failed > 0 || tr.skipped > 0)
|
||||||
.map(tr => {
|
.map(tr => {
|
||||||
|
|
@ -168,6 +173,10 @@ function getTestRunsReport(testRuns: TestRunResult[], options: ReportOptions): s
|
||||||
const suitesReports = testRuns.map((tr, i) => getSuitesReport(tr, i, options)).flat()
|
const suitesReports = testRuns.map((tr, i) => getSuitesReport(tr, i, options)).flat()
|
||||||
sections.push(...suitesReports)
|
sections.push(...suitesReports)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (totalFailed === 0) {
|
||||||
|
sections.push(`</details>`)
|
||||||
|
}
|
||||||
return sections
|
return sections
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue