c8
c8 copied to clipboard
feature: report: ability to use dynamic source maps for `?count=x` imported files
This is example of changes that can be made to get support of loaded and transformed files (#325).
As I understand, the problem can be somewhere in v8-to-instanbul when we are going to apply coverage. The thing is files sizes is different, and offsets different too, and they should be converted somehow 🤔. And there is conversion but it returns Infinity and NaN for some reason.
Checklist
- [ ]
npm test, tests passing - [ ]
npm run test:snap(to update the snapshot) - [ ] tests and/or benchmarks are included
- [ ] documentation is changed or added
@coderaiser I would love to close out some of these long standing PRs. Any chance I could bother you to write a test for this, and we can get it merged?
Ia have no idea how to test this, if you know the best way for this, will be amazing to have support of dynamic imports merged with this or any other PR.
@coderaiser mind rebasing and we can go from there?
I think what we could potentially do would be to try to write a test based on a fixture of output from Node.js
Just rebased
@coderaiser looks like something is weird here, quite a few failing tests.
The thing is this is not a full solution, I didn’t figure out the full way of fixing this behaviour, you can take a look at repository it https://github.com/coderaiser/c8-reproduce, the problem in resulting coverage file that should be merged for files a.jsand a.js?any-quary, so file can be re-imported in tests and it was mirrored in coverage files.