Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude {test,spec}-d files from coverage by default #5630

Closed
4 tasks done
sagargurtu opened this issue Apr 27, 2024 · 4 comments · Fixed by #5634
Closed
4 tasks done

Exclude {test,spec}-d files from coverage by default #5630

sagargurtu opened this issue Apr 27, 2024 · 4 comments · Fixed by #5634
Labels
feat: coverage Issues and PRs related to the coverage feature good first issue Good for newcomers pr welcome

Comments

@sagargurtu
Copy link
Contributor

Clear and concise description of the problem

https://stackblitz.com/edit/vitest-dev-vitest-rrhq6a

Currently, {test,spec}-d files need to be manually added to coverage.exclude.

Suggested solution

Regular test files are excluded from coverage by default. Similarly, it will be helpful to add {test,spec}-d file pattern to coverageConfigDefaults.exclude

Alternative

No response

Additional context

No response

Validations

@MindfulPol
Copy link
Contributor

MindfulPol commented Apr 28, 2024

👋🏿 Hi @sagargurtu, @AriPerkkio

I've modified an existing glob pattern to additionally take into account the ''-d'' flag. Let me know if that's fine. 👍🏿
Btw, found this through Opire. Cool software 😄

@AriPerkkio AriPerkkio linked a pull request Apr 30, 2024 that will close this issue
2 tasks
@github-actions github-actions bot locked and limited conversation to collaborators May 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feat: coverage Issues and PRs related to the coverage feature good first issue Good for newcomers pr welcome
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
@AriPerkkio @sagargurtu @MindfulPol and others