Skip to content

Commit

Permalink
Rollback unnecessary change which drops coverage
Browse files Browse the repository at this point in the history
Check if process.stdout is available was added based on xunit reporter example. However this branch is not covered by test and previously this was not present in json reporter nor json-stream reporter.
  • Loading branch information
dorny committed Mar 15, 2021
1 parent 97b0b70 commit 5d18965
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/reporters/json.js
Expand Up @@ -82,10 +82,8 @@ function JSONReporter(runner, options) {
if (output) {
fs.mkdirSync(path.dirname(output), {recursive: true});
fs.writeFileSync(output, json);
} else if (typeof process === 'object' && process.stdout) {
process.stdout.write(json);
} else {
Base.consoleLog(json);
process.stdout.write(json);
}
});
}
Expand Down

0 comments on commit 5d18965

Please sign in to comment.