-
Notifications
You must be signed in to change notification settings - Fork 1
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
Bug with v8 Paths, but not sure what is the root cause #5
Comments
This path issue could be a sourcemap issue. The sourcemap of the file didn't provide the full path of the file. {"version":3,"sources":["file.js"],"sourcesContent":[ ... It is supposed to be: {"version":3,"sources":["path/to/file.js"],"sourcesContent":[ ... Please try to normalize the const path = require("path")
// MCR coverage options
{
sourcePath: (filePath, info)=> {
if (!filePath.includes('/') && info.distFile) {
return `${path.dirname(info.distFile)}/${filePath}`;
}
return filePath;
},
} |
Thanks I believe that did it! That's definitely worth documenting in the README. Should it go in this repo or the monocart main one? |
Thank you for the reminder, I have updated the document for both |
I followed the example provided in the README, but the issue I'm seeing with my system is that the v8 data strips out the sourcePath from the file. This does not happen if the jest config does not have
coverageProvider: 'v8'
. The thing is, I'm not sure why this is happening. I'm opening this issue more to discuss. I have not made a way to publicly reproduce because this is on our internal monorepo with Bazel.Basically, the lcov file generate is missing
path/to/file.ts
with that option on. It just returnsfile.ts
.I have some theories, but nothing concrete. Any ideas?
The text was updated successfully, but these errors were encountered: