Skip to content

coverage.exclude should be fully configurable #5965

@AriPerkkio

Description

@AriPerkkio

Describe the bug

Following configuration should overwrite all default values of coverage.exclude. It should not exclude dist directory:

defineConfig({
  test: {
    // Only node_modules should be excluded, nothing else
    coverage: { exclude: ['**/node_modules/**'] },
  }
})

Actual: Hard coded default values are still applied. dist is excluded no matter what.

Reproduction

https://github.com/donmccurdy/2024-06-24_vitest_coverage_issue

System Info

Any

Used Package Manager

npm

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    feat: coverageIssues and PRs related to the coverage featurep3-minor-bugAn edge case that only affects very specific usage (priority)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions