Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add outputFile config and tests #168

Merged
merged 1 commit into from May 25, 2021

Conversation

daivinhtran
Copy link
Contributor

@daivinhtran daivinhtran commented May 25, 2021

As proposed in #167, I added outputFile and JEST_JUNIT_OUTPUT_FILE which will override outputDirectory and outputName if defined.

One of the use cases for this feature is when using with Bazel, we need the fullpath to the output to be dynamically defined by bazel.

Closes #167

@daivinhtran daivinhtran force-pushed the add-outputfile-config branch 2 times, most recently from 1f18e64 to 1f6057c Compare May 25, 2021 14:52
@@ -23,17 +24,13 @@ const processor = (report, reporterOptions = {}, jestRootDir = null) => {

const jsonResults = buildJsonResults(report, fs.realpathSync(process.cwd()), options);

// Set output to use new outputDirectory and fallback on original output
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This block is refactored into ./utils.getOutputPath.js for cleaniness. I can move it back if you prefer it that way.

@palmerj3 palmerj3 merged commit 69e802c into jest-community:master May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bazel + Jest: Dynamic location for jest-junit's xml file
2 participants