1
0
Fork 0
mirror of https://github.com/dorny/test-reporter.git synced 2026-03-21 23:52:12 +01:00

Report jest-junit testsuite errors as failures

Test errors are different (represented differently in the JUnit XML
output from jest-junit) to test _failures_. Failures are tests
which ran and failed, errors are for tests/test suites which
did not even run because the test code itself didn't build
or didn't execute correctly.

jest-junit has an option to enable reporting of test suite errors,
but test-reporter then interprets these as successful tests.
This commit is contained in:
Jozef Izso 2026-03-15 13:07:22 +01:00
parent 540c28072b
commit f8ae4deee6
Failed to extract signature
7 changed files with 141 additions and 3 deletions

View file

@ -0,0 +1,22 @@
![Tests failed](https://img.shields.io/badge/tests-2%20failed-critical)
|Report|Passed|Failed|Skipped|Time|
|:---|---:|---:|---:|---:|
|[fixtures/test-errors/jest/jest-test-results.xml](#user-content-r0)||2 ❌||646ms|
## ❌ <a id="user-content-r0" href="#user-content-r0">fixtures/test-errors/jest/jest-test-results.xml</a>
**2** tests were completed in **646ms** with **0** passed, **2** failed and **0** skipped.
|Test suite|Passed|Failed|Skipped|Time|
|:---|---:|---:|---:|---:|
|[libs/bar.spec.ts](#user-content-r0s0)||1 ❌||0ms|
|[libs/foo.spec.ts](#user-content-r0s1)||1 ❌||0ms|
### ❌ <a id="user-content-r0s0" href="#user-content-r0s0">libs/bar.spec.ts</a>
```
Test suite failed to run
❌ libs/bar.spec.ts
● Test suite failed to run
```
### ❌ <a id="user-content-r0s1" href="#user-content-r0s1">libs/foo.spec.ts</a>
```
Test suite failed to run
❌ libs/foo.spec.ts
● Test suite failed to run
```