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

bug: file missing from coverage #232

Closed
mikeal opened this issue Jul 6, 2020 · 2 comments · Fixed by #233
Closed

bug: file missing from coverage #232

mikeal opened this issue Jul 6, 2020 · 2 comments · Fixed by #233
Labels

Comments

@mikeal
Copy link

mikeal commented Jul 6, 2020

  • Version: 7.2.0
  • Platform: Linux, Node.js v14.5.0

I’m seeing this error:

file: /root/brrp/src/rollup-iter.js error: TypeError: Cannot read property 'sources' of null
    at V8ToIstanbul.load (/root/brrp/node_modules/v8-to-istanbul/lib/v8-to-istanbul.js:46:34)
    at Report.getCoverageMapFromAllCoverageFiles (/root/brrp/node_modules/c8/lib/report.js:88:25)
    at async Report.run (/root/brrp/node_modules/c8/lib/report.js:59:20)
    at async exports.outputReport (/root/brrp/node_modules/c8/lib/commands/report.js:27:3)
    at async /root/brrp/node_modules/c8/bin/c8.js:39:9

As a result the file src/rollup-iter.js is missing from coverage and c8 passes the full coverage check :(

You can reproduce by running the tests in https://github.com/mikeal/brrp

Sorry for this being a little terse, I plan to return to this and debug a little bit more. It looks like it’s in v8-to-istanbul so I can at least track it down more, maybe even send a fix, but I wanted to get this logged before I forgot about it and moved on :)

@bcoe bcoe added the bug label Jul 11, 2020
@bcoe
Copy link
Owner

bcoe commented Jul 11, 2020

@mikeal we'll make an effort to patch this weekend.

I'm pretty confident it will be a weird edge-case in v8-to-istabul related to paths, and not some systemic issue. If you grep, coverage/tmp, does it have rollup-iter.js?

@bcoe
Copy link
Owner

bcoe commented Jul 11, 2020

@mikeal okay, I have a fix incoming for this for c8, it uncovered a bug with Node.js' source map implementation which I am going to patch at the same time.

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

Successfully merging a pull request may close this issue.

2 participants