Documentation for filtering is very confusing. I tried every possible combination of options, but I wasn't able to set up filtering the way I want.
What I want:
- Collect coverage for all
*.ts and *.tsx files in my project's src/ folder (even for those files that weren't executed during a test run).
- Exclude files in
__tests__ folders. I do not want test files to show up in the report.
- Exclude
testData.ts, *.test.ts, and *.test.tsx files. I do not want test files to show up in the report.
- Exclude npm packages. I do not want third party files to show up in the report.
I tried every combination of all, filter, entryFilter, and sourceFilter options I could think of, but every time the result is unexpected.
I either get 0% coverage, or I get third party files in the report (like src/applyMiddleware.ts from Redux, or src/Components/Alert/Alert.tsx from a UI library).
And I just can't exclude test files like src/actions/main/__tests__/main.test.tsx.
I think this use case is very common, so it would be helpful for the community if you could provide an example configuration for it.
Documentation for filtering is very confusing. I tried every possible combination of options, but I wasn't able to set up filtering the way I want.
What I want:
*.tsand*.tsxfiles in my project'ssrc/folder (even for those files that weren't executed during a test run).__tests__folders. I do not want test files to show up in the report.testData.ts,*.test.ts, and*.test.tsxfiles. I do not want test files to show up in the report.I tried every combination of
all,filter,entryFilter, andsourceFilteroptions I could think of, but every time the result is unexpected.I either get 0% coverage, or I get third party files in the report (like
src/applyMiddleware.tsfrom Redux, orsrc/Components/Alert/Alert.tsxfrom a UI library).And I just can't exclude test files like
src/actions/main/__tests__/main.test.tsx.I think this use case is very common, so it would be helpful for the community if you could provide an example configuration for it.