Reporter options for Jest
Created by: jdelucaa
Is your proposal related to a problem?
CRA only supports overriding a few Jest options and reporters
is not one of them. I know that I can add reporters via cli --reporters=my-reporter
, the problem is that I would like to pass in some options to that, but reporter options are not available via cli (https://jestjs.io/docs/en/next/cli#--reporters).
I really don't want to eject my CRA setup, so i wish it was more flexible when it comes to Jest configurations.
Describe the solution you'd like
This is what I'd like to be able to do:
"reporters": [
"default",
["./node_modules/jest-cucumber/dist/src/reporter", {
"formatter": "json",
"path": "./reports/test-report.json"
}]
],
Describe alternatives you've considered
I could use something like craco, but it would be even nicer to have it (and other Jest configs) out of the box in CRA.
Additional context
https://github.com/facebook/create-react-app/issues/2474 https://github.com/facebook/create-react-app/issues/6224