Skip to content

test runner: Could not report code coverage (regression) #54240

@yume-chan

Description

@yume-chan

Version

v22.6.0

Platform

Linux f5d6c39aef47 5.15.153.1-microsoft-standard-WSL2 #1 SMP Fri Mar 29 23:14:13 UTC 2024 x86_64 GNU/Linux

Subsystem

No response

What steps will reproduce the bug?

Because the cryptic error message, I can't narrow the repro down further.

npm i -g pnpm
git clone --depth 1 https://github.com/yume-chan/ya-webadb.git
cd ya-webadb/
pnpm i
pnpm build
cd libraries/struct
npx tsc -b tsconfig.test.json
node --enable-source-maps --experimental-test-coverage --test esm/struct.spec.js

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

100%

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

Reports code coverage. It worked in v20.15.0

What do you see instead?

Begin with v20.16.0, it outputs:

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

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    coverageIssues and PRs related to native coverage 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