-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
feat: coverageIssues and PRs related to the coverage featureIssues and PRs related to the coverage featurep3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)
Description
Describe the bug
I'm using @vitest/web-worker to test a web worker. @vitest/coverage-v8 reports incorrect coverage metrics, while @vitest/coverage-istanbul seems to work fine.
Reproduction
https://github.com/robojumper/vitest-web-worker-v8-coverage-bug - run npm run test:coverage and view the coverage report for src/worker/worker.ts:
istanbul coverage looks correct while v8 coverage is completely wrong.
System Info
System:
OS: Windows 10 10.0.19045
CPU: (12) x64 AMD Ryzen 5 3600 6-Core Processor
Memory: 18.36 GB / 31.91 GB
Binaries:
Node: 22.13.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
npm: 10.9.0 - C:\Program Files\nodejs\npm.CMD
pnpm: 9.6.0 - ~\AppData\Roaming\npm\pnpm.CMD
Browsers:
Edge: Chromium (132.0.2957.127)
Internet Explorer: 11.0.19041.4355
npmPackages:
@vitest/coverage-istanbul: ^3.0.4 => 3.0.4
@vitest/coverage-v8: ^3.0.4 => 3.0.4
@vitest/ui: ^3.0.4 => 3.0.4
@vitest/web-worker: ^3.0.4 => 3.0.4
vite: ^6.0.0 => 6.0.11
vitest: ^3.0.4 => 3.0.4Used Package Manager
npm
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
feat: coverageIssues and PRs related to the coverage featureIssues and PRs related to the coverage featurep3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)

