Skip to content

Test_runner: --experimental-test-coverage generates partial file names #51299

Closed
@fawazahmed0

Description

@fawazahmed0

Version

v21.5.0

Platform

Microsoft Windows NT 10.0.22621.0 x64

Subsystem

No response

What steps will reproduce the bug?

This issue only happens in windows; mac works fine.

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

No response

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

No response

What do you see instead?

I see partial file names

Here is the coverage report generated in windows:

# start of coverage report
# ------------------------------------------------------------------------------------------------------------------------------------------------------
# file     | line % | branch % | funcs % | uncovered lines
# ------------------------------------------------------------------------------------------------------------------------------------------------------
# …test.js | 100.00 |   100.00 |  100.00 | 
# …test.js | 100.00 |    88.89 |  100.00 | 
# …ties.js |  28.96 |    53.33 |   14.29 | 22-27 37-50 56-61 64-75 77-79 81-87 115 119-132 146-148 152-154 156-158 160-164 166-174 177-180 182-184 186…
# ------------------------------------------------------------------------------------------------------------------------------------------------------
# all fil… |  39.07 |    72.41 |   30.00 |
# ------------------------------------------------------------------------------------------------------------------------------------------------------
# end of coverage report

Here is my complete command:

node --test --test-concurrency=1 --experimental-test-coverage --test-reporter=tap --test-reporter-destination=code/test/testlog.tap code/test/*.test.js

Additional information

The issue happens if my test.js files contains const {somefunc} = require('../mymodule') i.e importing module by relative path

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueIssues that are suitable for first-time contributors.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