File tree 5 files changed +6
-4
lines changed
packages/vitest/src/node/reporters
5 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ export class JUnitReporter implements Reporter {
131
131
for ( const frame of stack ) {
132
132
const path = relative ( this . ctx . config . root , frame . file )
133
133
134
- await this . baseLog ( ` ${ F_POINTER } ${ [ frame . method , `${ path } :${ frame . line } :${ frame . column } ` ] . filter ( Boolean ) . join ( ' ' ) } ` )
134
+ await this . baseLog ( escapeXML ( ` ${ F_POINTER } ${ [ frame . method , `${ path } :${ frame . line } :${ frame . column } ` ] . filter ( Boolean ) . join ( ' ' ) } ` ) )
135
135
136
136
// reached at test file, skip the follow stack
137
137
if ( frame . file in this . ctx . state . filesMap )
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ function createSuiteHavingFailedTestWithXmlInError(): File[] {
28
28
29
29
errorWithXml . stack = 'Error: error message that has XML in it <tag>\n'
30
30
+ ' at /vitest/test/core/test/basic.test.ts:8:32\n'
31
+ + ' at /vitest/test/core/test/<bracket-name>.ts:3:11\n'
31
32
+ ' at etc....'
32
33
33
34
const tasks : Task [ ] = [
Original file line number Diff line number Diff line change 1
- // Vitest Snapshot v1
1
+ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
2
3
3
exports [` html reporter > resolves to "failing" status for test file "json-fail" > tests are failing 1` ] = `
4
4
{
Original file line number Diff line number Diff line change 1
- // Vitest Snapshot v1
1
+ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
2
3
3
exports [` json reporter > generates correct report 1` ] = `
4
4
{
Original file line number Diff line number Diff line change 1
- // Vitest Snapshot v1
1
+ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
2
3
3
exports [` JUnit reporter (no outputFile entry) 1` ] = `
4
4
"<?xml version=\\ "1.0\\ " encoding=\\ "UTF-8\\ " ?>
@@ -249,6 +249,7 @@ exports[`JUnit reporter with outputFile with XML in error message 2`] = `
249
249
<failure message =\\"error message that has XML in it <tag>\\" type =\\"AssertionError\\">
250
250
AssertionError: error message that has XML in it <tag>
251
251
❯ test/core/test/basic.test.ts:8:32
252
+ ❯ test/core/test/<bracket-name>.ts:3:11
252
253
</failure>
253
254
</testcase>
254
255
</testsuite>
You can’t perform that action at this time.
0 commit comments