-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
enhancementNew feature or requestNew feature or requestp2-nice-to-haveNot breaking anything but nice to have (priority)Not breaking anything but nice to have (priority)pr welcome
Description
Describe the bug
vitest should include the coverage map in the coverage report but instead puts them in separate files.
The report should contain a key for the coverage map
e.g.
vitest run --coverage --outputFile=report.json --reporter=json
"coverageMap": {
"/src/test.ts": {
"path": "/src/test.ts",
"statementMap": {
"0": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 44
}
}
}
}
}
Instead it puts the coverage map in a separate file:
coverage/coverage-final.json
Reproduction
If you run:
`% vitest run --coverage --outputFile=report.json --reporter=json
Both of these searches will not return any results:
% grep coverageMap report.json
% grep statementMap report.json
while this will return a result indicating that the json file is the coverage map.
% grep statementMap coverage/coverage-final.json
System Info
System:
OS: macOS 14.0
CPU: (8) arm64 Apple M2
Memory: 685.72 MB / 24.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.16.0 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 9.5.1 - /usr/local/bin/npm
Browsers:
Brave Browser: 116.1.57.47
Chrome: 117.0.5938.149
Safari: 17.0
npmPackages:
@vitest/coverage-v8: ^0.34.6 => 0.34.6
vite: ^4.4.11 => 4.4.11
vitest: ^0.34.6 => 0.34.6Used 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
enhancementNew feature or requestNew feature or requestp2-nice-to-haveNot breaking anything but nice to have (priority)Not breaking anything but nice to have (priority)pr welcome