generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gracefully handle empty nested testsuite elements for JUnit. #193
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This fixes an issue with mocha-junit-reporter returning empty root-level testsuite elements.
dorny
approved these changes
Nov 13, 2022
@rvdlaarschot Thanks for the contribution and sorry for the late response. |
github-merge-queue bot
referenced
this pull request
in AmadeusITGroup/otter
Mar 8, 2024
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [dorny/test-reporter](https://togithub.com/dorny/test-reporter) | action | minor | `v1` -> `v1.8.0` | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>dorny/test-reporter (dorny/test-reporter)</summary> ### [`v1.8.0`](https://togithub.com/dorny/test-reporter/releases/tag/v1.8.0) [Compare Source](https://togithub.com/dorny/test-reporter/compare/v1.7.0...v1.8.0) #### What's Changed - CHANGELOG.md by [@​j-catania](https://togithub.com/j-catania) in [https://github.com/dorny/test-reporter/pull/297](https://togithub.com/dorny/test-reporter/pull/297) - Bump [@​babel/traverse](https://togithub.com/babel/traverse) from 7.12.1 to 7.23.2 in /reports/jest by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/dorny/test-reporter/pull/303](https://togithub.com/dorny/test-reporter/pull/303) - Bump [@​babel/traverse](https://togithub.com/babel/traverse) from 7.22.20 to 7.23.2 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/dorny/test-reporter/pull/304](https://togithub.com/dorny/test-reporter/pull/304) - Add `SwiftXunitParser` class based on `JavaJunitParser` for `swift-xunit` reporter by [@​jozefizso](https://togithub.com/jozefizso) in [https://github.com/dorny/test-reporter/pull/317](https://togithub.com/dorny/test-reporter/pull/317) - Update to Node20 by [@​j-catania](https://togithub.com/j-catania) in [https://github.com/dorny/test-reporter/pull/315](https://togithub.com/dorny/test-reporter/pull/315) - Fix build error by [@​dorny](https://togithub.com/dorny) in [https://github.com/dorny/test-reporter/pull/331](https://togithub.com/dorny/test-reporter/pull/331) - Use NodeJS 18 LTS as default runtime by [@​jozefizso](https://togithub.com/jozefizso) in [https://github.com/dorny/test-reporter/pull/332](https://togithub.com/dorny/test-reporter/pull/332) - Update all packages by [@​jozefizso](https://togithub.com/jozefizso) in [https://github.com/dorny/test-reporter/pull/333](https://togithub.com/dorny/test-reporter/pull/333) - Escape <> characters in suite name by [@​wingyplus](https://togithub.com/wingyplus) in [https://github.com/dorny/test-reporter/pull/236](https://togithub.com/dorny/test-reporter/pull/236) - Adding feature and bug template by [@​j-catania](https://togithub.com/j-catania) in [https://github.com/dorny/test-reporter/pull/341](https://togithub.com/dorny/test-reporter/pull/341) - Update check title and remove icon by [@​ldaneliukas](https://togithub.com/ldaneliukas) in [https://github.com/dorny/test-reporter/pull/144](https://togithub.com/dorny/test-reporter/pull/144) - `test-reporter` release v1.8.0 by [@​jozefizso](https://togithub.com/jozefizso) in [https://github.com/dorny/test-reporter/pull/370](https://togithub.com/dorny/test-reporter/pull/370) #### New Contributors - [@​jozefizso](https://togithub.com/jozefizso) made their first contribution in [https://github.com/dorny/test-reporter/pull/317](https://togithub.com/dorny/test-reporter/pull/317) - [@​wingyplus](https://togithub.com/wingyplus) made their first contribution in [https://github.com/dorny/test-reporter/pull/236](https://togithub.com/dorny/test-reporter/pull/236) - [@​ldaneliukas](https://togithub.com/ldaneliukas) made their first contribution in [https://github.com/dorny/test-reporter/pull/144](https://togithub.com/dorny/test-reporter/pull/144) **Full Changelog**: dorny/test-reporter@v1.7.0...v1.8.0 ### [`v1.7.0`](https://togithub.com/dorny/test-reporter/releases/tag/v1.7.0) [Compare Source](https://togithub.com/dorny/test-reporter/compare/v1.6.0...v1.7.0) #### What's Changed - Fix [#​199](https://togithub.com/dorny/test-reporter/issues/199): Use ✅ instead of ✔️ for better cross platform look by [@​petrdvorak](https://togithub.com/petrdvorak) in [https://github.com/dorny/test-reporter/pull/200](https://togithub.com/dorny/test-reporter/pull/200) - Verify content of dist/ folder matches build output by [@​dorny](https://togithub.com/dorny) in [https://github.com/dorny/test-reporter/pull/207](https://togithub.com/dorny/test-reporter/pull/207) - Gracefully handle empty nested testsuite elements for JUnit. by [@​rvdlaarschot](https://togithub.com/rvdlaarschot) in [https://github.com/dorny/test-reporter/pull/193](https://togithub.com/dorny/test-reporter/pull/193) - Gracefully handle empty failure tags by [@​haudren-woven](https://togithub.com/haudren-woven) in [https://github.com/dorny/test-reporter/pull/213](https://togithub.com/dorny/test-reporter/pull/213) - Fix [#​208](https://togithub.com/dorny/test-reporter/issues/208) - java-junit: show annotations on PR changed files by [@​atsu85](https://togithub.com/atsu85) in [https://github.com/dorny/test-reporter/pull/209](https://togithub.com/dorny/test-reporter/pull/209) - Only report failure if fail-on-error is set by [@​trond-snekvik](https://togithub.com/trond-snekvik) in [https://github.com/dorny/test-reporter/pull/214](https://togithub.com/dorny/test-reporter/pull/214) - Improve clarity on configuring for forkable repos by [@​abelbraaksma](https://togithub.com/abelbraaksma) in [https://github.com/dorny/test-reporter/pull/211](https://togithub.com/dorny/test-reporter/pull/211) - Suppress "Processing test results from" log by [@​vasanthdharmaraj](https://togithub.com/vasanthdharmaraj) in [https://github.com/dorny/test-reporter/pull/179](https://togithub.com/dorny/test-reporter/pull/179) - Skip listing of files if error parsing is disabled by [@​dorny](https://togithub.com/dorny) in [https://github.com/dorny/test-reporter/pull/216](https://togithub.com/dorny/test-reporter/pull/216) - Correct typo in docs by [@​tangowithfoxtrot](https://togithub.com/tangowithfoxtrot) in [https://github.com/dorny/test-reporter/pull/254](https://togithub.com/dorny/test-reporter/pull/254) - update dependencies by [@​j-catania](https://togithub.com/j-catania) in [https://github.com/dorny/test-reporter/pull/269](https://togithub.com/dorny/test-reporter/pull/269) - Add permissions to example yml files by [@​TurnrDev](https://togithub.com/TurnrDev) in [https://github.com/dorny/test-reporter/pull/263](https://togithub.com/dorny/test-reporter/pull/263) - add feature fail-on-empty by [@​gdams](https://togithub.com/gdams) in [https://github.com/dorny/test-reporter/pull/243](https://togithub.com/dorny/test-reporter/pull/243) - Add dependabot configuration by [@​yeikel](https://togithub.com/yeikel) in [https://github.com/dorny/test-reporter/pull/228](https://togithub.com/dorny/test-reporter/pull/228) - Bump ws from 7.3.1 to 7.5.9 in /reports/jest by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/dorny/test-reporter/pull/265](https://togithub.com/dorny/test-reporter/pull/265) - Bump actions/checkout from 2 to 4 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/dorny/test-reporter/pull/279](https://togithub.com/dorny/test-reporter/pull/279) - Add new output for url url html by [@​luisito666](https://togithub.com/luisito666) in [https://github.com/dorny/test-reporter/pull/242](https://togithub.com/dorny/test-reporter/pull/242) - Update README.md by [@​IanMoroney](https://togithub.com/IanMoroney) in [https://github.com/dorny/test-reporter/pull/158](https://togithub.com/dorny/test-reporter/pull/158) - Update jest-Junit part of Readme by [@​ryancasburn-KAI](https://togithub.com/ryancasburn-KAI) in [https://github.com/dorny/test-reporter/pull/176](https://togithub.com/dorny/test-reporter/pull/176) - fix: default-valued fields are not mandatory by [@​TomerFi](https://togithub.com/TomerFi) in [https://github.com/dorny/test-reporter/pull/172](https://togithub.com/dorny/test-reporter/pull/172) - Bump ansi-regex from 4.1.0 to 4.1.1 in /reports/jest by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/dorny/test-reporter/pull/278](https://togithub.com/dorny/test-reporter/pull/278) - Bump decode-uri-component from 0.2.0 to 0.2.2 in /reports/jest by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/dorny/test-reporter/pull/276](https://togithub.com/dorny/test-reporter/pull/276) - Bump minimist from 1.2.5 to 1.2.8 in /reports/jest by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/dorny/test-reporter/pull/275](https://togithub.com/dorny/test-reporter/pull/275) - Bump qs from 6.5.2 to 6.5.3 in /reports/jest by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/dorny/test-reporter/pull/272](https://togithub.com/dorny/test-reporter/pull/272) - Bump json5 from 2.1.3 to 2.2.3 in /reports/jest by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/dorny/test-reporter/pull/271](https://togithub.com/dorny/test-reporter/pull/271) - Bump ansi-regex from 3.0.0 to 3.0.1 in /reports/mocha by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/dorny/test-reporter/pull/270](https://togithub.com/dorny/test-reporter/pull/270) - declare 'url' and 'url_html' as action outputs by [@​micha-one](https://togithub.com/micha-one) in [https://github.com/dorny/test-reporter/pull/287](https://togithub.com/dorny/test-reporter/pull/287) - Avoid split on undefined by [@​cazou](https://togithub.com/cazou) in [https://github.com/dorny/test-reporter/pull/258](https://togithub.com/dorny/test-reporter/pull/258) #### New Contributors - [@​petrdvorak](https://togithub.com/petrdvorak) made their first contribution in [https://github.com/dorny/test-reporter/pull/200](https://togithub.com/dorny/test-reporter/pull/200) - [@​rvdlaarschot](https://togithub.com/rvdlaarschot) made their first contribution in [https://github.com/dorny/test-reporter/pull/193](https://togithub.com/dorny/test-reporter/pull/193) - [@​haudren-woven](https://togithub.com/haudren-woven) made their first contribution in [https://github.com/dorny/test-reporter/pull/213](https://togithub.com/dorny/test-reporter/pull/213) - [@​atsu85](https://togithub.com/atsu85) made their first contribution in [https://github.com/dorny/test-reporter/pull/209](https://togithub.com/dorny/test-reporter/pull/209) - [@​trond-snekvik](https://togithub.com/trond-snekvik) made their first contribution in [https://github.com/dorny/test-reporter/pull/214](https://togithub.com/dorny/test-reporter/pull/214) - [@​abelbraaksma](https://togithub.com/abelbraaksma) made their first contribution in [https://github.com/dorny/test-reporter/pull/211](https://togithub.com/dorny/test-reporter/pull/211) - [@​vasanthdharmaraj](https://togithub.com/vasanthdharmaraj) made their first contribution in [https://github.com/dorny/test-reporter/pull/179](https://togithub.com/dorny/test-reporter/pull/179) - [@​tangowithfoxtrot](https://togithub.com/tangowithfoxtrot) made their first contribution in [https://github.com/dorny/test-reporter/pull/254](https://togithub.com/dorny/test-reporter/pull/254) - [@​TurnrDev](https://togithub.com/TurnrDev) made their first contribution in [https://github.com/dorny/test-reporter/pull/263](https://togithub.com/dorny/test-reporter/pull/263) - [@​gdams](https://togithub.com/gdams) made their first contribution in [https://github.com/dorny/test-reporter/pull/243](https://togithub.com/dorny/test-reporter/pull/243) - [@​yeikel](https://togithub.com/yeikel) made their first contribution in [https://github.com/dorny/test-reporter/pull/228](https://togithub.com/dorny/test-reporter/pull/228) - [@​luisito666](https://togithub.com/luisito666) made their first contribution in [https://github.com/dorny/test-reporter/pull/242](https://togithub.com/dorny/test-reporter/pull/242) - [@​IanMoroney](https://togithub.com/IanMoroney) made their first contribution in [https://github.com/dorny/test-reporter/pull/158](https://togithub.com/dorny/test-reporter/pull/158) - [@​ryancasburn-KAI](https://togithub.com/ryancasburn-KAI) made their first contribution in [https://github.com/dorny/test-reporter/pull/176](https://togithub.com/dorny/test-reporter/pull/176) - [@​TomerFi](https://togithub.com/TomerFi) made their first contribution in [https://github.com/dorny/test-reporter/pull/172](https://togithub.com/dorny/test-reporter/pull/172) - [@​micha-one](https://togithub.com/micha-one) made their first contribution in [https://github.com/dorny/test-reporter/pull/287](https://togithub.com/dorny/test-reporter/pull/287) - [@​cazou](https://togithub.com/cazou) made their first contribution in [https://github.com/dorny/test-reporter/pull/258](https://togithub.com/dorny/test-reporter/pull/258) **Full Changelog**: dorny/test-reporter@v1.6.0...v1.7.0 ### [`v1.6.0`](https://togithub.com/dorny/test-reporter/blob/HEAD/CHANGELOG.md#v160) [Compare Source](https://togithub.com/dorny/test-reporter/compare/v1.5.0...v1.6.0) - [Update to node16 + recent versions of core and exec packages](https://togithub.com/dorny/test-reporter/pull/203) - [Update all dependencies to latest versions](https://togithub.com/dorny/test-reporter/pull/186) - [Fix tests on non us-EN local env](https://togithub.com/dorny/test-reporter/pull/185) ### [`v1.5.0`](https://togithub.com/dorny/test-reporter/blob/HEAD/CHANGELOG.md#v150) [Compare Source](https://togithub.com/dorny/test-reporter/compare/v1.4.3...v1.5.0) - [Add option to convert backslashes in path pattern to forward slashes](https://togithub.com/dorny/test-reporter/pull/128) - [Add option to generate only the summary from processed test results files](https://togithub.com/dorny/test-reporter/pull/123) ### [`v1.4.3`](https://togithub.com/dorny/test-reporter/blob/HEAD/CHANGELOG.md#v143) [Compare Source](https://togithub.com/dorny/test-reporter/compare/v1.4.2...v1.4.3) - [Patch java-junit to handle missing time field](https://togithub.com/dorny/test-reporter/pull/115) - [Fix dart-json parsing broken by print message](https://togithub.com/dorny/test-reporter/pull/114) ### [`v1.4.2`](https://togithub.com/dorny/test-reporter/blob/HEAD/CHANGELOG.md#v142) [Compare Source](https://togithub.com/dorny/test-reporter/compare/v1.4.1...v1.4.2) - [Fix dotnet-trx parsing of passed tests with non-empty error info](https://togithub.com/dorny/test-reporter/commit/43d89d5ee509bcef7bd0287aacc0c4a4fb9c1657) ### [`v1.4.1`](https://togithub.com/dorny/test-reporter/blob/HEAD/CHANGELOG.md#v141) [Compare Source](https://togithub.com/dorny/test-reporter/compare/v1.4.0...v1.4.1) - [Fix dotnet-trx parsing of tests with custom display names](https://togithub.com/dorny/test-reporter/pull/105) ### [`v1.4.0`](https://togithub.com/dorny/test-reporter/blob/HEAD/CHANGELOG.md#v140) [Compare Source](https://togithub.com/dorny/test-reporter/compare/v1.3.1...v1.4.0) - [Add support for mocha-json](https://togithub.com/dorny/test-reporter/pull/90) - [Use full URL to fix navigation from summary to suite details](https://togithub.com/dorny/test-reporter/pull/89) - [New report rendering with code blocks instead of tables](https://togithub.com/dorny/test-reporter/pull/88) - [Improve test error messages from flutter](https://togithub.com/dorny/test-reporter/pull/87) ### [`v1.3.1`](https://togithub.com/dorny/test-reporter/blob/HEAD/CHANGELOG.md#v131) [Compare Source](https://togithub.com/dorny/test-reporter/compare/v1.3.0...v1.3.1) - [Fix: parsing of .NET duration string without milliseconds](https://togithub.com/dorny/test-reporter/pull/84) - [Fix: dart-json - remove group name from test case names](https://togithub.com/dorny/test-reporter/pull/85) - [Fix: net-trx parser crashing on missing duration attribute](https://togithub.com/dorny/test-reporter/pull/86) ### [`v1.3.0`](https://togithub.com/dorny/test-reporter/blob/HEAD/CHANGELOG.md#v130) [Compare Source](https://togithub.com/dorny/test-reporter/compare/v1.2.0...v1.3.0) - [Add support for java-junit](https://togithub.com/dorny/test-reporter/pull/80) - [Fix: Handle test reports with no test cases](https://togithub.com/dorny/test-reporter/pull/70) - [Fix: Reduce number of API calls to get list of files tracked by GitHub](https://togithub.com/dorny/test-reporter/pull/69) ### [`v1.2.0`](https://togithub.com/dorny/test-reporter/blob/HEAD/CHANGELOG.md#v120) [Compare Source](https://togithub.com/dorny/test-reporter/compare/v1.1.0...v1.2.0) - [Set `listTests` and `listSuites` to lower detail if report is too big](https://togithub.com/dorny/test-reporter/pull/60) ### [`v1.1.0`](https://togithub.com/dorny/test-reporter/blob/HEAD/CHANGELOG.md#v110) [Compare Source](https://togithub.com/dorny/test-reporter/compare/v1.0.0...v1.1.0) - [Support public repo PR workflow](https://togithub.com/dorny/test-reporter/pull/56) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 10pm every weekday,before 5am every weekday,every weekend" in timezone Europe/Paris, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/AmadeusITGroup/otter). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMzAuMCIsInVwZGF0ZWRJblZlciI6IjM3LjIzMC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes an issue with mocha-junit-reporter returning empty root-level testsuite elements.
When exclusively using a
describe()
in a Mocha test file, there are no test cases on the root. Themocha-junit-test-reporter
library still outputs a root-leveltestsuite
element without any test cases. This would cause an error in the existing implementation of the junit parser logic. This PR fixes this issue and includes an additional test case for this scenario.michaelleeallen/mocha-junit-reporter#53