Skip to content
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

fix(reporter-junit): escape XML when in error message (fix: #1823) #1890


Copy link

When a error message has XML it made the junit reporter wasn't escaping when writing it to the log.

This should fix #1823

I don't love how i created createSuiteHavingFailedTestWithXmlInError to have an test case and welcome feedback.

@ChrisTowles ChrisTowles force-pushed the chris-towles/fix-junit-when-xml-in-error-message branch 2 times, most recently from d29d4ce to 8c4aa9a Compare August 21, 2022 04:53
@ChrisTowles ChrisTowles force-pushed the chris-towles/fix-junit-when-xml-in-error-message branch from 8c4aa9a to 0673943 Compare August 21, 2022 12:56
Copy link
Contributor Author

Windows Tests was flakey, It broke 3 times with different errors seemingly not related to this change.

I force pushed a no-op change and it worked last time....

@antfu antfu requested a review from Demivan August 21, 2022 18:09
test/reporters/src/data.ts Outdated Show resolved Hide resolved
@antfu antfu merged commit b35f42d into vitest-dev:main Aug 23, 2022
@ChrisTowles ChrisTowles deleted the chris-towles/fix-junit-when-xml-in-error-message branch August 23, 2022 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

Junit reporter does not escape error messages and stacktraces
3 participants