We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
How do you ignore the src/stories directory when running a --coverage test?
src/stories
I am using a create-react-app base and have tried the following in my package.json
create-react-app
"jest": { "collectCoverageFrom": [ "src/**/*.{js,jsx}", "!<rootDir>/node_modules/", "!<rootDir>/src/stories/" ] }
The text was updated successfully, but these errors were encountered:
It looks like you can't pass options to jest via that mechanism in CRA (facebook/create-react-app#922).
You can pass an argument to jest on the commandline though:
npm test -- --coverage --collectCoverageFrom='["src/**/*.{js,jsx}","!src/**/stories/*"]'
Do you think we should add some documentation about this?
Sorry, something went wrong.
Thanks @tmeasday.
Yes, I think it would be helpful for --coverage tests.
No branches or pull requests
How do you ignore the
src/stories
directory when running a --coverage test?I am using a
create-react-app
base and have tried the following in my package.jsonThe text was updated successfully, but these errors were encountered: