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

Use outputStream instead of stdout for output file #4858

Merged
merged 2 commits into from
Feb 23, 2018

Conversation

rogeliog
Copy link
Contributor

@rogeliog rogeliog commented Nov 8, 2017

Summary

Fixes #4795

Test plan

This uses the output stream instead of a hardcoded stdout

@rogeliog
Copy link
Contributor Author

rogeliog commented Nov 8, 2017

Oh wow that are a lot of failing tests that I was not expecting, I'll look into them

}
}
return options.onComplete && options.onComplete(runResults);
};

export default async function runJest({
export default (async function runJest({
Copy link
Member

Choose a reason for hiding this comment

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

why paren?

@cpojer
Copy link
Member

cpojer commented Dec 11, 2017

@rogeliog: mind pushing this over the finish line so we can ship Jest 22?

@@ -77,7 +77,7 @@ const processResults = (runResults, options) => {
const filePath = path.resolve(process.cwd(), outputFile);

fs.writeFileSync(filePath, JSON.stringify(formatTestResults(runResults)));
process.stdout.write(
options.outputStream.write(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I only ended up changing it for the case when --json --outputFile and --useStderr are used at the same time. Changing it for --json --useStderr wihtout --outputFIle broke a lot of integration tests, which made me curious if that was even the expected behavior. That is why I left it the way it was.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Makes sense this way. Does it still fix the issue?

@codecov-io
Copy link

Codecov Report

Merging #4858 into master will decrease coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4858      +/-   ##
==========================================
- Coverage   61.66%   61.66%   -0.01%     
==========================================
  Files         213      213              
  Lines        7070     7069       -1     
  Branches        3        3              
==========================================
- Hits         4360     4359       -1     
  Misses       2709     2709              
  Partials        1        1
Impacted Files Coverage Δ
packages/jest-cli/src/run_jest.js 50.79% <0%> (ø) ⬆️
packages/jest-util/src/create_process_object.js 100% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c8d1c79...ed5fb8a. Read the comment docs.

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--outputFile CLI option overrides the --useStderr option
6 participants