Skip to content

Commit 860f7ef

Browse files
authored
Merge pull request #72 from lalugeo/master
Add XML prolog to junit output
2 parents 3da1128 + 3a82918 commit 860f7ef

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

constants/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ module.exports = {
3030
FILEPATH_VAR: 'filepath',
3131
TITLE_VAR: 'title',
3232
DISPLAY_NAME_VAR: 'displayName',
33-
};
33+
};

index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const processor = (report, reporterOptions = {}, jestRootDir = null) => {
2525
mkdirp.sync(path.dirname(finalOutput));
2626

2727
// Write data to file
28-
fs.writeFileSync(finalOutput, xml(jsonResults, { indent: ' ' }));
28+
fs.writeFileSync(finalOutput, xml(jsonResults, { indent: ' ', declaration: true }));
2929

3030
// Jest 18 compatibility
3131
return report;
@@ -70,4 +70,3 @@ function JestJUnit (globalConfig, options) {
7070
}
7171

7272
module.exports = JestJUnit;
73-

0 commit comments

Comments
 (0)