How to run a single test and collect coverage from it without running and skipping all the other tests?

Viewed 18

I am using the following command to run and collect coverage from a single test:

jest --coverage --collectCoverageFrom="./src/pages/analytics/index.tsx" -t "./src/pages/analytics/index.tsx"

Despite running only the selected test, it passes through all the existing tests, trying to find the match and skip those that doesn't. It takes 4~5 minutes to run and generate the coverage of only one simple test.

Is there a way to collect coverage of only one, without having to pass and skip through all the other tests?

0 Answers
Related