Skip to content

add coverage-path and coverage-ignore-path in test_runner coverage. #51222

@pulkit-30

Description

@pulkit-30

What is the problem this feature will solve?

coverage-path: to specify the path from which the coverage summary should be collected. and
coverage-ignore-path: to specify the files and directories that should be ignored while collecting coverage.

these can be two cli flags also, passed along with --test-coverage flag.
something like this:

node --test --experimental-test-coverage --coverage-path='./src/**' --coverage-ignore='./src/utils/**' index.test.mjs

What is the feature you are proposing to solve the problem?

currently, there is no way to include or exclude a file or directory from test coverage.

What alternatives have you considered?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues that request new features to be added to Node.js.test_runnerIssues and PRs related to the test runner subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions