jest-junit
Advanced tools
Comparing version 9.0.0 to 10.0.0
@@ -15,2 +15,3 @@ 'use strict'; | ||
JEST_JUNIT_INCLUDE_CONSOLE_OUTPUT: 'includeConsoleOutput', | ||
JEST_JUNIT_INCLUDE_SHORT_CONSOLE_OUTPUT: 'includeShortConsoleOutput', | ||
JEST_USE_PATH_FOR_SUITE_NAME: 'usePathForSuiteName', | ||
@@ -30,2 +31,3 @@ }, | ||
includeConsoleOutput: 'false', | ||
includeShortConsoleOutput: 'false' | ||
}, | ||
@@ -32,0 +34,0 @@ CLASSNAME_VAR: 'classname', |
{ | ||
"name": "jest-junit", | ||
"version": "9.0.0", | ||
"version": "10.0.0", | ||
"description": "A jest reporter that generates junit xml files", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -68,4 +68,5 @@ [![Build Status](https://travis-ci.org/jest-community/jest-junit.svg?branch=master)](https://travis-ci.org/jest-community/jest-junit) | ||
| `JEST_JUNIT_ANCESTOR_SEPARATOR` | `ancestorSeparator` | Character(s) used to join the `describe` blocks. | `" "` | N/A | ||
| `JEST_JUNIT_ADD_FILE_ATTRIBUTE` | `addFileAttribute` | Add file attribute to the output. This config is primarily for Circle CI. This setting provides richer details but may break on other CI platforms. | `false` | N/A | ||
| `JEST_JUNIT_ADD_FILE_ATTRIBUTE` | `addFileAttribute` | Add file attribute to the output. This config is primarily for Circle CI. This setting provides richer details but may break on other CI platforms. Must be a string. | `"false"` | N/A | ||
| `JEST_JUNIT_INCLUDE_CONSOLE_OUTPUT` | `includeConsoleOutput` | Adds console output to any testSuite that generates stdout during a test run. | `false` | N/A | ||
| `JEST_JUNIT_INCLUDE_SHORT_CONSOLE_OUTPUT` | `includeShortConsoleOutput` | Adds short console output (only message value) to any testSuite that generates stdout during a test run. | `false` | N/A | ||
| `JEST_USE_PATH_FOR_SUITE_NAME` | `usePathForSuiteName` | **DEPRECATED. Use `suiteNameTemplate` instead.** Use file path as the `name` attribute of `<testsuite>` | `"false"` | N/A | ||
@@ -72,0 +73,0 @@ |
@@ -117,3 +117,17 @@ 'use strict'; | ||
} | ||
// Write short stdout console output if available | ||
if (options.includeShortConsoleOutput === 'true' && suite.console && suite.console.length) { | ||
// Extract and then Stringify the console message value | ||
// Easier this way because formatting in a readable way is tough with XML | ||
// And this can be parsed more easily | ||
let testSuiteConsole = { | ||
'system-out': { | ||
_cdata: JSON.stringify(suite.console.map(item => item.message), null, 2) | ||
} | ||
}; | ||
testSuite.testsuite.push(testSuiteConsole); | ||
} | ||
// Iterate through test cases | ||
@@ -120,0 +134,0 @@ suite.testResults.forEach((tc) => { |
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
31924
322
223