-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Avoid writing to stdout in default reporter if --json is enabled. Fixes #3941 #3945
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3945 +/- ##
==========================================
- Coverage 58.06% 58.01% -0.06%
==========================================
Files 196 196
Lines 6758 6764 +6
Branches 6 6
==========================================
Hits 3924 3924
- Misses 2831 2837 +6
Partials 3 3
Continue to review full report at Codecov.
|
// This is to avoid conflicts between random output and status text | ||
this._clearStatus(); | ||
originalWrite.call(stream, string); | ||
string && originalWrite.call(stream, string); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (string) {
pls
const testCase = { | ||
context: {config: {rootDir: '/'}}, | ||
path: '/foo', | ||
duration: 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please sort keys alphabetically.
duration: 0, | ||
}; | ||
const testResult = { | ||
testFilePath: '/foo' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comma
}; | ||
|
||
let DefaultReporter; | ||
let stdout, stderr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: only one var definition per let
.
expect(stdout).toHaveBeenCalled(); | ||
}); | ||
|
||
test('when using stderr as output, no stdout call is done', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"is made", maybe?
Sweet! Please run |
…led. Fixes #3941" (#3951) * Revert "fix typo in snapshot testing documentation (#3948)" This reverts commit d6998c2. * Revert "Fix linting (#3946)" This reverts commit 9426521. * Revert "Avoid writing to stdout in default reporter if --json is enabled. Fixes #3941 (#3945)" This reverts commit 68d747d.
…led. Fixes jestjs#3941" (jestjs#3951) * Revert "fix typo in snapshot testing documentation (jestjs#3948)" This reverts commit d6998c2. * Revert "Fix linting (jestjs#3946)" This reverts commit 9426521. * Revert "Avoid writing to stdout in default reporter if --json is enabled. Fixes jestjs#3941 (jestjs#3945)" This reverts commit 68d747d.
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. |
Check #3941 for more details.