Socket
Socket
Sign inDemoInstall

jest-junit

Package Overview
Dependencies
Maintainers
2
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-junit - npm Package Compare versions

Comparing version 12.0.0 to 12.1.0

utils/getOutputPath.js

1

constants/index.js

@@ -8,2 +8,3 @@ 'use strict';

JEST_JUNIT_OUTPUT_NAME: 'outputName',
JEST_JUNIT_OUTPUT_FILE: 'outputFile',
JEST_JUNIT_UNIQUE_OUTPUT_NAME: 'uniqueOutputName',

@@ -10,0 +11,0 @@ JEST_JUNIT_CLASSNAME: 'classNameTemplate',

11

index.js

@@ -10,2 +10,3 @@ 'use strict';

const getOptions = require('./utils/getOptions');
const getOutputPath = require('./utils/getOutputPath');

@@ -27,13 +28,9 @@ // Store console results from onTestResult to later

// Set output to use new outputDirectory and fallback on original output
const outputName = (options.uniqueOutputName === 'true') ? getOptions.getUniqueOutputName() : options.outputName
const output = path.join(options.outputDirectory, outputName);
let outputPath = getOutputPath(options, jestRootDir);
const finalOutput = getOptions.replaceRootDirInOutput(jestRootDir, output);
// Ensure output path exists
mkdirp.sync(path.dirname(finalOutput));
mkdirp.sync(path.dirname(outputPath));
// Write data to file
fs.writeFileSync(finalOutput, xml(jsonResults, { indent: ' ', declaration: true }));
fs.writeFileSync(outputPath, xml(jsonResults, { indent: ' ', declaration: true }));

@@ -40,0 +37,0 @@ // Jest 18 compatibility

{
"name": "jest-junit",
"version": "12.0.0",
"version": "12.1.0",
"description": "A jest reporter that generates junit xml files",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -62,2 +62,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_OUTPUT_FILE` | `outputFile` | Fullpath for the output. If defined, `outputDirectory` and `outputName` will be overridden | `undefined` | N/A
| `JEST_JUNIT_UNIQUE_OUTPUT_NAME` | `uniqueOutputName` | Create unique file name for the output `junit-${uuid}.xml`, overrides `outputName` | `false` | N/A

@@ -64,0 +65,0 @@ | `JEST_JUNIT_SUITE_NAME` | `suiteNameTemplate` | Template string for `name` attribute of the `<testsuite>`. | `"{title}"` | `{title}`, `{filepath}`, `{filename}`, `{displayName}`

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc