-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
feat: coverageIssues and PRs related to the coverage featureIssues and PRs related to the coverage featurep2-to-be-discussedEnhancement under consideration (priority)Enhancement under consideration (priority)
Description
Describe the bug
I have a typescript file that only contains typescript interfaces. When I run vitest with coverage I get it reported as red (uncovered) even when the interfaces are referenced by other files that are covered by tests.
The way jest handles this situation is to not count these file as neither covered or uncovered but just empty and colored in gray:
Reproduction
Here is the github repo from the images:
to run it:
cd vite-app
npm i
npm run testSystem Info
System:
OS: Windows 10 10.0.22621
CPU: (32) x64 AMD Ryzen 9 7950X 16-Core Processor
Memory: 14.66 GB / 31.16 GB
Binaries:
Node: 18.12.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.19 - C:\Program Files\nodejs\yarn.CMD
npm: 9.2.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.22621.1778.0), Chromium (114.0.1823.51)
Internet Explorer: 11.0.22621.1
npmPackages:
@vitejs/plugin-react: ^4.0.0 => 4.0.0
@vitest/coverage-v8: ^0.32.2 => 0.32.2
vite: ^4.3.2 => 4.3.9
vitest: ^0.32.0 => 0.32.2Used 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 featurep2-to-be-discussedEnhancement under consideration (priority)Enhancement under consideration (priority)
Type
Projects
Status
P2 - 2

