You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to create a PR but I cannot get the reporters test suite to run. Running vitest run test/reporters gives No test suite found in file test/reporters/tests/reporters.spec.ts
Am I missing something? And another question: Would it be ok / desirable if I modified test/reporters/src/data.ts to include an error with invalid XML syntax or should I build up my own files in the test case I am writing? I am fine with both.
Describe the bug
The Junit reporter produces illegal XML if something resembling an XML tag shows up in the error message or stack trace.
As an example, we get this Junit-XML which is clearly malformed:
The string
<anonymous>
should be escaped.Reproduction
See the following Stackblitz for an example of a test that produces malformed XML:
https://stackblitz.com/edit/vitest-dev-vitest-b4w9ta?file=test/basic.test.ts
System Info
System: OS: Linux 5.10 Ubuntu 20.04.3 LTS (Focal Fossa) CPU: (4) x64 Intel(R) Xeon(R) CPU @ 2.20GHz Memory: 2.61 GB / 3.84 GB Container: Yes Shell: 5.0.17 - /bin/bash Binaries: Node: 18.7.0 - /usr/bin/node Yarn: 3.1.0 - /usr/bin/yarn npm: 8.15.0 - /usr/bin/npm npmPackages: vitest: 0.21.0 => 0.21.0
Used Package Manager
yarn
Validations
The text was updated successfully, but these errors were encountered: