jest-junit
Advanced tools
Comparing version 8.0.0 to 9.0.0
'use strict'; | ||
const path = require('path'); | ||
module.exports = { | ||
@@ -10,2 +8,3 @@ ENVIRONMENT_CONFIG_MAP: { | ||
JEST_JUNIT_OUTPUT_NAME: 'outputName', | ||
JEST_JUNIT_UNIQUE_OUTPUT_NAME: 'uniqueOutputName', | ||
JEST_JUNIT_CLASSNAME: 'classNameTemplate', | ||
@@ -23,2 +22,3 @@ JEST_JUNIT_SUITE_NAME: 'suiteNameTemplate', | ||
outputName: 'junit.xml', | ||
uniqueOutputName: 'false', | ||
classNameTemplate: '{classname} {title}', | ||
@@ -25,0 +25,0 @@ suiteNameTemplate: '{title}', |
@@ -28,3 +28,4 @@ 'use strict'; | ||
// Set output to use new outputDirectory and fallback on original output | ||
const output = path.join(options.outputDirectory, options.outputName); | ||
const outputName = (options.uniqueOutputName === 'true') ? getOptions.getUniqueOutputName() : options.outputName | ||
const output = path.join(options.outputDirectory, outputName); | ||
@@ -31,0 +32,0 @@ const finalOutput = getOptions.replaceRootDirInOutput(jestRootDir, output); |
{ | ||
"name": "jest-junit", | ||
"version": "8.0.0", | ||
"version": "9.0.0", | ||
"description": "A jest reporter that generates junit xml files", | ||
@@ -10,3 +10,3 @@ "main": "index.js", | ||
"engines": { | ||
"node": ">=6.0.0" | ||
"node": ">=8.0.0" | ||
}, | ||
@@ -24,11 +24,12 @@ "files": [ | ||
"dependencies": { | ||
"jest-validate": "^24.0.0", | ||
"jest-validate": "^24.9.0", | ||
"mkdirp": "^0.5.1", | ||
"strip-ansi": "^4.0.0", | ||
"strip-ansi": "^5.2.0", | ||
"uuid": "^3.3.3", | ||
"xml": "^1.0.1" | ||
}, | ||
"devDependencies": { | ||
"jest": "^24.0.0", | ||
"libxmljs": "^0.18.4" | ||
"jest": "^24.9.0", | ||
"libxmljs": "^0.19.7" | ||
} | ||
} |
@@ -63,2 +63,3 @@ [![Build Status](https://travis-ci.org/jest-community/jest-junit.svg?branch=master)](https://travis-ci.org/jest-community/jest-junit) | ||
| `JEST_JUNIT_OUTPUT_NAME` | `outputName` | File name for the output. | `"junit.xml"` | N/A | ||
| `JEST_JUNIT_UNIQUE_OUTPUT_NAME` | `uniqueOutputName` | Create unique file name for the output `junit-${uuid}.xml`, overrides `outputName` | `false` | N/A | ||
| `JEST_JUNIT_SUITE_NAME` | `suiteNameTemplate` | Template string for `name` attribute of the `<testsuite>`. | `"{title}"` | `{title}`, `{filepath}`, `{filename}`, `{displayName}` | ||
@@ -88,2 +89,3 @@ | `JEST_JUNIT_CLASSNAME` | `classNameTemplate` | Template string for the `classname` attribute of `<testcase>`. | `"{classname} {title}"` | `{classname}`, `{title}`, `{filepath}`, `{filename}`, `{displayName}` | ||
"outputName": "junit.xml", | ||
"uniqueOutputName": "false" | ||
"classNameTemplate": "{classname}-{title}", | ||
@@ -90,0 +92,0 @@ "titleTemplate": "{classname}-{title}", |
@@ -5,2 +5,3 @@ 'use strict'; | ||
const fs = require('fs'); | ||
const uuid = require('uuid/v1'); | ||
@@ -54,2 +55,6 @@ const constants = require('../constants/index'); | ||
function getUniqueOutputName() { | ||
return `junit-${uuid()}.xml` | ||
} | ||
module.exports = { | ||
@@ -61,3 +66,4 @@ options: (reporterOptions = {}) => { | ||
getEnvOptions: getEnvOptions, | ||
replaceRootDirInOutput: replaceRootDirInOutput | ||
replaceRootDirInOutput: replaceRootDirInOutput, | ||
getUniqueOutputName: getUniqueOutputName | ||
}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
31037
308
222
5
+ Addeduuid@^3.3.3
+ Addedstrip-ansi@5.2.0(transitive)
+ Addeduuid@3.4.0(transitive)
- Removedansi-regex@3.0.1(transitive)
- Removedstrip-ansi@4.0.0(transitive)
Updatedjest-validate@^24.9.0
Updatedstrip-ansi@^5.2.0