-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
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
Support Jest coverageThreshold option #922
Comments
Any insights on this ? Could be nice to provide custom config to Jest :) |
I would really like to be able to use the jest config options in package.json. Some of the defaults (such as bail=false) are very, very annoying. I don't think this would create much entropy. |
File an issue and describe your use case? It’s really hard to guess that something is “very annoying” if nobody tells us about it. 😉 A lot of those might not be conscious decisions so you should question them in issues by explaining your use cases. |
@gaearon What about the |
@gaelduplessix We intend to add some configurability in the future. I'm not closing the issue but now is not the time yet. Perhaps in a few months when more things shake out (e.g. Jest has been going through a ton of changes recently). |
Jest configurability would be excellent, thanks! For now, this is how we achieve coverage threshold checking on CI: "coverage": "CI=true npm t -- --coverage",
"postcoverage": "istanbul check-coverage --statements 90 --functions 90 --branches 90 --lines 90", |
Chiming in here (or should I raise a new issue?), but I'd like to be able to set the This would be trivial, if create-react-app allowed Jest configuration in package.json. Naively, I'm wondering if utils/createJestConfig.js could be updated to merge package.json config if it exists. Something like: const config = {
collectCoverageFrom: ['src/**/*.{js,jsx}'],
/* ... */
};
if (rootDir) {
config.rootDir = rootDir;
}
return {
...config,
...packageJson.jest,
}; |
@jagregory You should be able to use |
@gaearon Do you know which Jest version that function is available? I'm using CRA 0.9.5, which has Jest 18.1.0, and I'm getting |
Looks like |
This is configurable in the next version. |
Please help beta test the new version that includes this change! |
I would like to configure the coverage threshold from
jest
to be able to launch jenkins from CI with a 90-100% coverage.Can we have support for this in Create react app ?
What is the most relevant:
--config="{}"
frompackage.json
?The text was updated successfully, but these errors were encountered: