Skip to content

Empty code coverage on transpiled JS code #558

@gpradeepjain

Description

@gpradeepjain

I am inside a folder that has the below structure
src/ -> this has *.js and *.js.map
test/ -> this has *.js and *.js.map

I run the command c8@10.1.3/node_modules/c8/bin/c8.js --include src//*.js mocha@11.1.0/node_modules/mocha/bin/mocha.js test/unit//*.js --verbose

It does the tests but my coverage report says 0

----------|---------|----------|---------|---------|-------------------

File % Stmts % Branch % Funcs % Lines Uncovered Line #s
All files 0 0 0 0
---------- --------- ---------- --------- --------- -------------------

=============================== Coverage summary ===============================
Statements : Unknown% ( 0/0 )
Branches : Unknown% ( 0/0 )
Functions : Unknown% ( 0/0 )
Lines : Unknown% ( 0/0 )

I tried --src src as well. But nothing worked. Does C8 work for transpiled JS code? How do I debug the above problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions