-
-
Notifications
You must be signed in to change notification settings - Fork 35.3k
Exclude test files from coverage report #53508
Copy link
Copy link
Closed
Labels
coverageIssues and PRs related to native coverage support.Issues and PRs related to native coverage support.feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.test_runnerIssues and PRs related to the test runner subsystem.Issues and PRs related to the test runner subsystem.
Metadata
Metadata
Assignees
Labels
coverageIssues and PRs related to native coverage support.Issues and PRs related to native coverage support.feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.test_runnerIssues and PRs related to the test runner subsystem.Issues and PRs related to the test runner subsystem.
What is the problem this feature will solve?
Hey folks! 👋🏼
I know that as by doc it's currently not possible to exclude specific files or directories from the coverage report.
The problem I face right now is that the coverage includes all of the test files.
For instance, if I have the following file:
and the test:
Once I run
node --experimental-test-coverage --testI get:What is the feature you are proposing to solve the problem?
Ideally,
.test.*should be excluded from the coverage reportWhat alternatives have you considered?
No response