Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cli): correctly handle special characters in JUnit failure details
Those details are contained in XML CDATA section and should therefore not be XML-escaped.
- Loading branch information
1 parent
f1b2c2c
commit ffc1c1e
Showing
3 changed files
with
109 additions
and
3 deletions.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
packages/cli/src/formatters/__tests__/__fixtures__/errors-with-special-xml-strings.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
[ | ||
{ | ||
"code": "special-xml-strings", | ||
"message": "start ' \" < > end", | ||
"path": [ | ||
"root", | ||
"'", | ||
"\"", | ||
"leaf" | ||
], | ||
"severity": 0, | ||
"source": "", | ||
"range": { | ||
"start": { | ||
"line": 0, | ||
"character": 0 | ||
}, | ||
"end": { | ||
"line": 0, | ||
"character": 0 | ||
} | ||
} | ||
}, | ||
{ | ||
"code": "special-cdata-strings", | ||
"message": "start <![CDATA[ ]]> <![CDATA[ end", | ||
"path": [ | ||
"root", | ||
"]]>", | ||
"<![CDATA[", | ||
"leaf" | ||
], | ||
"severity": 0, | ||
"source": "", | ||
"range": { | ||
"start": { | ||
"line": 0, | ||
"character": 0 | ||
}, | ||
"end": { | ||
"line": 0, | ||
"character": 0 | ||
} | ||
} | ||
} | ||
] |
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 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