diff --git a/constants/index.js b/constants/index.js index ba97e91..2300271 100644 --- a/constants/index.js +++ b/constants/index.js @@ -30,4 +30,4 @@ module.exports = { FILEPATH_VAR: 'filepath', TITLE_VAR: 'title', DISPLAY_NAME_VAR: 'displayName', -}; \ No newline at end of file +}; diff --git a/index.js b/index.js index 13d67d4..9a4a937 100644 --- a/index.js +++ b/index.js @@ -25,7 +25,7 @@ const processor = (report, reporterOptions = {}, jestRootDir = null) => { mkdirp.sync(path.dirname(finalOutput)); // Write data to file - fs.writeFileSync(finalOutput, xml(jsonResults, { indent: ' ' })); + fs.writeFileSync(finalOutput, xml(jsonResults, { indent: ' ', declaration: true })); // Jest 18 compatibility return report; @@ -70,4 +70,3 @@ function JestJUnit (globalConfig, options) { } module.exports = JestJUnit; -