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

Could not report code coverage for file in sourcemap #55054

Open
avivkeller opened this issue Sep 21, 2024 · 0 comments
Open

Could not report code coverage for file in sourcemap #55054

avivkeller opened this issue Sep 21, 2024 · 0 comments
Labels
confirmed-bug Issues with confirmed bugs. coverage Issues and PRs related to native coverage support. source maps Issues and PRs related to source map support. test_runner Issues and PRs related to the test runner subsystem.

Comments

@avivkeller
Copy link
Member

avivkeller commented Sep 21, 2024

Version

v22.9.0

Platform

N/A

Subsystem

test_runner

What steps will reproduce the bug?

Create index.mjs:

export {}
//# sourceMappingURL=index.mjs.map

Create index.mjs.map:

{"version":3,"file":"index.mjs","sourceRoot":"","sources":["index.mjs"],"names":[],"mappings":"AAEA"}

Run:

node --experimental-test-coverage --test index.mjs

How often does it reproduce? Is there a required condition?

Every time.

What is the expected behavior? Why is that the expected behavior?

Coverage should be reported, or an error explaining why it wasn't is displayed.

What do you see instead?

ℹ Warning: Could not report code coverage. TypeError: Cannot read properties of undefined (reading 'startOffset')

Additional information

CC @nodejs/test_runner

@avivkeller avivkeller added confirmed-bug Issues with confirmed bugs. coverage Issues and PRs related to native coverage support. source maps Issues and PRs related to source map support. test_runner Issues and PRs related to the test runner subsystem. labels Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed-bug Issues with confirmed bugs. coverage Issues and PRs related to native coverage support. source maps Issues and PRs related to source map support. test_runner Issues and PRs related to the test runner subsystem.
Projects
None yet
Development

No branches or pull requests

1 participant