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): v8 to ignore type-only files #5328

Merged

Conversation

AriPerkkio
Copy link
Member

@AriPerkkio AriPerkkio commented Mar 3, 2024

Description

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

  • 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.
  • Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.

Tests

  • 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

  • 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 Mar 3, 2024

Deploy Preview for fastidious-cascaron-4ded94 ready!

Name Link
🔨 Latest commit 2c3a910
🔍 Latest deploy log https://app.netlify.com/sites/fastidious-cascaron-4ded94/deploys/65e4c11d73b6d30008b71c15
😎 Deploy Preview https://deploy-preview-5328--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.

@AriPerkkio
Copy link
Member Author

/ecosystem-ci run

@vitest-ecosystem-ci
Copy link

vitest-ecosystem-ci bot commented Mar 3, 2024

📝 Ran ecosystem CI: Open

suite result
nuxt ✅ success
nuxt-test-utils ✅ success
vite ✅ success
vitest-sonar-reporter ✅ success
vitest-github-actions-reporter ✅ success
vitest-browser-simple ✅ success
vitest-coverage-large ✅ success
vitest-reporters-large ✅ success

@AriPerkkio
Copy link
Member Author

Nuxt's failure looks like real issue. It's passing fine on main. 🤔

@AriPerkkio AriPerkkio force-pushed the fix/coverage-v8-empty-files branch from 10265d5 to ef21bca Compare March 3, 2024 18:08
@AriPerkkio
Copy link
Member Author

Nuxt's failure looks like real issue. It's passing fine on main. 🤔

It was a file that failed in vitenode.transformRequest() - probably some missing configuration as the error came from #internal/nitro import statement. That file has no tests in Nuxt's repo. There's now .catch(() => {}) to simply ignore these errors.

@AriPerkkio AriPerkkio marked this pull request as ready for review March 3, 2024 18:17
@AriPerkkio AriPerkkio force-pushed the fix/coverage-v8-empty-files branch from ef21bca to 2c3a910 Compare March 3, 2024 18:27
@sheremet-va sheremet-va merged commit c3eb8de into vitest-dev:main Mar 4, 2024
19 checks passed
@AriPerkkio AriPerkkio deleted the fix/coverage-v8-empty-files branch March 5, 2024 04:51
@JoshuaKGoldberg
Copy link
Contributor

Confirmed this fixed a whole bunch of types.ts files in my repositories, thank you very much @AriPerkkio & @sheremet-va! ❤️

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.

When using coverage.all typescript files with no executable code are colored red in the coverage report
3 participants