Open lencioni opened 7 years ago
Hi 👋,
Thanks for reporting!
Yeah this will be real nice. I think this is part of a broader discussion (How to configure Jest runners?), for which there is an ongoing discussion here -> https://github.com/facebook/jest/issues/4278
Off the top of my head I think of some different paths that we could take.
facebook/jest
and allow for a way to customize runnersjest-runner-eslint.config.js
) or field in the package.json
This doesn't mean that they are the correct solutions, so I'm more than open to better solutions
Can runner options be passed on the command line?
That would be awesome but right now Jest returns
❯ yarn jest -- --watch --quiet --fix
● Unrecognized CLI Parameters:
Following options were not recognized:
["quiet", "fix"]
CLI Options Documentation:
http://facebook.github.io/jest/docs/cli.html
error Command failed with exit code 1.
That's not what I meant - custom reporters in a jest config can take options https://facebook.github.io/jest/docs/en/configuration.html#reporters-array-modulename-modulename-options - can those be provided via command line at all, in --reporters
?
Oh sorry, I misunderstood... my bad!
No, runners can't do that right now, but that is one of the proposals on how to add configs to runners https://github.com/facebook/jest/issues/4278#issuecomment-326676409
I sometimes want to run eslint with the
--quiet
and--fix
options to autofix rules across large numbers of files. I was unable to find a way to use these options with the jest runner and think it would be really great if there was a way.If there is already a way, it would be wonderful to document it!