bibipkins / dotnet-test-reporter

A GitHub action to parse test results and post the summary as a PR comment
MIT License
19 stars 9 forks source link

It throws error when there is no test #33

Closed maxisam closed 1 year ago

maxisam commented 1 year ago

currently it expects there is at least one test in the report, if there is no test in the report, it will throw errors.

Thanks for the great tool !

maxisam commented 1 year ago

https://github.com/bibipkins/dotnet-test-reporter/blob/311db8b035a1df3874396e9dc831d4c54903eb81/src/parsers/trx.ts#L44

I believe it is from this line.

So if there is no test, it doesn't have <Results> tag

bibipkins commented 1 year ago

@maxisam, thank you for checking out the action and reporting the bug! I will try to fix it asap. Also thanks for digging into the issue ❤️ !

maxisam commented 1 year ago

no problem. I created a PR to fix this, since this is more like a edge case for my project.

bibipkins commented 1 year ago

@maxisam Thank you for your contribution! I merged your PR and created a new release v1.3.1 you can try out now. Feel free to reopen the issue if the problem persists