## Bug Report
Included reporters should include Json Jest Reporter
Cannot use --json with other reporters
Jest Json Reporter
https://gist.github.com/nullxone/08c34925cf2f5e1a5123f2fb5837ac11
I'm running jest remotely. I want to see the colourful output in my terminal.
I ALSO want the json output to be generated so that I can somehow proceed to send it to my editor / other tools vscode-jest
Why does this feature belong in the Jest core platform?
require("jest-util").formatTestResults is not in public api as per docsIt's not really a reporter - it mostly just dumps the test result to stdout. It should be pretty simple to implement as a custom reporter though, have you tried? See https://jestjs.io/docs/en/configuration#reporters-array-modulename-modulename-options. You get the object you're after in onRunComplete
I have implemented the reporter in this gist:
https://gist.github.com/nullxone/08c34925cf2f5e1a5123f2fb5837ac11
Structure output by --json flag is not the same as the format passed to custom reporters. It is defined by require("jest-util").formatTestResults which is not in the public api.
Jest should include the --json flag output structure as a custom reporter because:
The exports of jest-util, while not documented, are considered public API and are safe to use within a major. You can safely depend on it if you want
Thank you. That resolves the issue.
Can this be considered as a feature request? I think this is a good candidate for inclusion in jest for the above mentioned reasons.
I think it might actually be a cleanup to make it a proper reporter and set it up depending on flags instead of the default reporters. wdyt @SimenB?
Would be nice to deprecate the json flag and ask people to do --reporters json instead.