Skip to content

Version 17.1.0 --all records coverage of .mjs files json files in .nyc_output but doesn't report on the cli #1597

@adligo

Description

@adligo

Hi All,

So I'm working on a new testing library tests4ts (also tests4j), and after I do a
npm install -g @ts.adligo.org/slink
$ slink -v
1.5.7

npm install -g NYC

git clone slink_docker.ts.adligo.org
... more scripts that clone sub projects of sub projects ...

cd slink-group/slink_group.ts.adligo.org
npm run build
cd slink_tests.ts.adligo.org
NYC --all node dist/slink_tests.ts.adligo.org/src/slinkApiTrials.mjs

I get output like this;
-------------------------------|---------|----------|---------|---------|-------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
-------------------------------|---------|----------|---------|---------|-------------------
All files | 0 | 0 | 0 | 0 |
fsContextManualApiTrial.ts | 0 | 0 | 0 | 0 | 23-138
slinkSingleTestCodeRunner.ts | 0 | 100 | 100 | 0 | 24
slinkSingleTestRunner.ts | 0 | 100 | 100 | 0 | 20-27
slinkSingleTrialCodeRunner.ts | 0 | 100 | 100 | 0 | 25
slinkSingleTrialRunner.ts | 0 | 100 | 100 | 0 | 17-24
-------------------------------|---------|----------|---------|---------|-------------------

However, if I dig around in the .nyc_output I read processinfo/index.json and then the subsequent paths to json files I can see NYC has instrumented (and I think captured coverage of) a bunch of .mjs files.

I believe that the text reporter is missing the reporting of coverage of a bunch of files, however, I'm not yet an expert at reading these JSON files.

What is the best way to learn about these files?

I have tried all kinds of combinations of "include" in the package.json, on the cli etc but nothing seems to show the additional coverage of the .mjs files. How can I determine if the coverage is being captured or if the text reporter is the issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions