Skip to content
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

feature: report: ability to use dynamic source maps for ?count=x imported files #345

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

coderaiser
Copy link
Contributor

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

@bcoe
Copy link
Owner

bcoe commented Jun 10, 2024

@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?

@coderaiser
Copy link
Contributor Author

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.

@bcoe
Copy link
Owner

bcoe commented Jun 10, 2024

@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

@coderaiser
Copy link
Contributor Author

Just rebased

@bcoe
Copy link
Owner

bcoe commented Jun 11, 2024

@coderaiser looks like something is weird here, quite a few failing tests.

@coderaiser
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants