findxc / react-hello

一个 React playground 啦
7 stars 0 forks source link

add script to run jest coverage for one file #36

Closed findxc closed 2 years ago

findxc commented 2 years ago

npm run jestc src/pages/no-match/index.test.js will become craco test "src/pages/no-match/index.test.js" "--watchAll=false" "--coverage" "--collectCoverageFrom=src/pages/no-match/index.js*", note that it will only collect coverage from src/pages/no-match/index.js*.

When you want to improve coverage, this script will be helpful.