Skip to content

Could not report code coverage for file in sourcemap #55054

Open
@avivkeller

Description

@avivkeller

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues with confirmed bugs.coverageIssues and PRs related to native coverage support.source mapsIssues and PRs related to source map support.test_runnerIssues and PRs related to the test runner subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions