Created by: pgdejardin
The developer can add a Jest config in package.json
and override what it wants from the config file generated by react-script
I've made this to answer #1455 (closed) and #1830. I had to ignore *.stories.js
from my coverage script and the coverage threshold and I didn't want to add them in the script himself but as Jest config.
This is a config that could be used :
"jest": {
"collectCoverageFrom": [
"src/**/*.{js,jsx}",
"!src/**/*.test.{js,jsx}",
"!src/**/*.stories.{js,jsx}",
"!src/stories/**/*.{js,jsx}"
],
"coverageThreshold": {
"global": {
"statements": 98,
"branches": 91,
"functions": 98,
"lines": 98
}
}
}
I hope it will help