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

fix(coverage): exclude *.test-d.* by default #5634

Merged
merged 4 commits into from
Apr 30, 2024

Conversation

MindfulPol
Copy link
Contributor

@MindfulPol MindfulPol commented Apr 28, 2024

Description

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

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • [x ] It's really useful if your PR references an issue where it is discussed ahead of time. If the feature is substantial or introduces breaking changes without a discussion, PR might be closed.
  • Ideally, include a test that fails without this PR but passes with it.
  • [ x] Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.

Tests

  • [ x] Run the tests with pnpm test:ci.

Documentation

  • If you introduce new functionality, document it. You can run documentation with pnpm run docs command.

Changesets

  • [x ] Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.

Copy link

netlify bot commented Apr 28, 2024

Deploy Preview for fastidious-cascaron-4ded94 ready!

Name Link
🔨 Latest commit 9f4c3f9
🔍 Latest deploy log https://app.netlify.com/sites/fastidious-cascaron-4ded94/deploys/6630b77372d084000854a0a1
😎 Deploy Preview https://deploy-preview-5634--fastidious-cascaron-4ded94.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@AriPerkkio AriPerkkio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As test case let's add should-be-excluded-from-report.test-d.ts to test/coverage-test/src/. Simply adding that file should be enough as coverage tests are already validating all files inside that directory. If the new exclusion pattern is removed, some snapshot tests should fail.

@AriPerkkio AriPerkkio changed the title feat(coverage): exclude {test,spec}-d by default fix(coverage): exclude {test,spec}-d by default Apr 30, 2024
@AriPerkkio AriPerkkio linked an issue Apr 30, 2024 that may be closed by this pull request
4 tasks
@MindfulPol MindfulPol requested a review from AriPerkkio April 30, 2024 08:45
@MindfulPol
Copy link
Contributor Author

Hey @AriPerkkio ,
File added, thank you for pointing out. 🙏🏿
I've modified my last commit message name so it's called ''fix'' rather than ''feat'' 😄

@AriPerkkio AriPerkkio changed the title fix(coverage): exclude {test,spec}-d by default fix(coverage): exclude *.test-d.* by default Apr 30, 2024
@AriPerkkio AriPerkkio merged commit bfe8ad9 into vitest-dev:main Apr 30, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exclude {test,spec}-d files from coverage by default
2 participants