在我的reactjs应用程序中,我正在为视图添加集成测试,并希望在此过程中保持我的覆盖范围.我目前正在每次运行中获取所有文件.
在添加测试以增加覆盖范围时,如何才能获得仅在特定文件夹中显示文件的jest覆盖?
$ yarn test --collectCoverageFrom=src/app/components/Tools
测试运行,没有覆盖在这里显示.
$ yarn test Tools --coverage --collectCoverageFrom=src/app/components/Tools
我得到Ran all test suites matching "Tools".
$ yarn test src/app/components/Tools --coverage
在这里,我看到覆盖百分比较小但仍列出所有文件.
$ yarn test -o --coverage
再次像前一样,我看到覆盖百分比较小,但仍列出所有文件.