Skip to content

Commit 8d070d8

Browse files
author
lalugeo
committed
using node-xml for generating prolog
1 parent dee72c0 commit 8d070d8

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

constants/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,4 @@ module.exports = {
3030
FILEPATH_VAR: 'filepath',
3131
TITLE_VAR: 'title',
3232
DISPLAY_NAME_VAR: 'displayName',
33-
XML_PROLOG_STRING: '<?xml version="1.0" encoding="UTF-8"?>',
3433
};

index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ const mkdirp = require('mkdirp');
55
const fs = require('fs');
66
const path = require('path');
77
const jestValidate = require('jest-validate');
8-
const constants = require('./constants');
98

109
const buildJsonResults = require('./utils/buildJsonResults');
1110
const getOptions = require('./utils/getOptions');
@@ -26,7 +25,7 @@ const processor = (report, reporterOptions = {}, jestRootDir = null) => {
2625
mkdirp.sync(path.dirname(finalOutput));
2726

2827
// Write data to file
29-
fs.writeFileSync(finalOutput, constants.XML_PROLOG_STRING + xml(jsonResults, { indent: ' ' }));
28+
fs.writeFileSync(finalOutput, xml(jsonResults, { indent: ' ', declaration: true }));
3029

3130
// Jest 18 compatibility
3231
return report;

0 commit comments

Comments
 (0)