1
0
Fork 0
mirror of https://github.com/dorny/test-reporter.git synced 2026-03-22 07:52:14 +01:00
test-reporter/__tests__
YuF-9468 f0016cb1da fix: Extract error message from PHPUnit error details when message attribute is missing
Fixes #711

When PHPUnit XML output contains <error> or <failure> elements without a
message attribute, the parser now extracts the error message from the error
details text instead of only showing the error type.

The improved logic:
1. Prefer message attribute when present (with type prepended)
2. Extract error message from details when it contains a line matching
   the error type (e.g., "TypeError: ...")
3. Fall back to first line of details
4. Finally, use error type as last resort

This provides more informative error messages in test reports when
PHPUnit outputs errors with the full stack trace in the element text
rather than a message attribute.
2026-03-16 21:39:44 +08:00
..
__outputs__ fix: Extract error message from PHPUnit error details when message attribute is missing 2026-03-16 21:39:44 +08:00
__snapshots__ fix: Extract error message from PHPUnit error details when message attribute is missing 2026-03-16 21:39:44 +08:00
fixtures fix: Extract error message from PHPUnit error details when message attribute is missing 2026-03-16 21:39:44 +08:00
report Modernize ESLint configuration 2026-03-02 17:15:02 +01:00
utils feat: added a slug-prefix parameter for link anchors 2026-03-05 01:52:45 +01:00
dart-json.test.ts Refactor tests to modedules based package 2026-03-02 14:29:31 +01:00
dotnet-nunit.test.ts Refactor tests to modedules based package 2026-03-02 14:29:31 +01:00
dotnet-trx.test.ts Refactor tests to modedules based package 2026-03-02 14:29:31 +01:00
github-workflow-run-context.test.ts Add test for new resolution of associated check run commits 2026-03-02 13:42:04 +01:00
golang-json.test.ts Refactor tests to modedules based package 2026-03-02 14:29:31 +01:00
java-junit.test.ts Refactor tests to modedules based package 2026-03-02 14:29:31 +01:00
java-stack-trace-element-parser.test.ts Refactor tests to modedules based package 2026-03-02 14:29:31 +01:00
jest-junit.test.ts Report jest-junit testsuite errors as failures 2026-03-15 13:24:18 +01:00
mocha-json.test.ts Refactor tests to modedules based package 2026-03-02 14:29:31 +01:00
phpunit-junit.test.ts Refactor tests to modedules based package 2026-03-02 14:29:31 +01:00
phpunit-message-extraction.test.ts fix: Extract error message from PHPUnit error details when message attribute is missing 2026-03-16 21:39:44 +08:00
python-xunit.test.ts Refactor tests to modedules based package 2026-03-02 14:29:31 +01:00
rspec-json.test.ts Refactor tests to modedules based package 2026-03-02 14:29:31 +01:00
swift-xunit.test.ts Refactor tests to modedules based package 2026-03-02 14:29:31 +01:00
tester-junit.test.ts Refactor tests to modedules based package 2026-03-02 14:29:31 +01:00