Empty html report using version 14+ (fine with v13 and below)
See original GitHub issueLink to bug demonstration repository
https://github.com/areel/nyc-bug-demo.git
Expected Behavior
issuing
nyc report --reporter=html
should generate a full report based on content of
./nyc_out/out.json
Observed Behavior
Using versions 14.0.0 and higher an empty html report is produced, Using latest releases of 10.X, 11.X, 12.x and 13.x all work as expected
Steps to observe issue
I have edited the original out.json to have only one instrumented module and edited the reference path to allow drilling into module. Follow steps below to see issue.
- clone repo
- yarn (using version 14.0.0 of nyc)
- yarn report
- coverage/index.html (does not contain expected content)
- coverage/alert.constants.ts.html (does not exist)
- delete yarn.lock
- delete node_modules
- delete coverage
- edit package.json dev dependency to be
"devDependencies": {
"nyc": "^13.0.0"
}
- save package.json !!
- yarn
- yarn report
- code coverage html report is correct
- index.html has reference to alert.constants.ts.html
- alert.constants.ts.html exists in coverage folder
Troubleshooting steps
- still occurring when I put
cache: falsein my nyc config - does not occur in latest release of versions 10,11,12 and 13
Environment Information
System:
OS: Linux 5.0 Manjaro Linux undefined
CPU: (16) x64 AMD Ryzen 7 1700 Eight-Core Processor
Memory: 11.33 GB / 31.40 GB
Binaries:
Node: 11.6.0 - ~/.asdf/shims/node
Yarn: 1.13.0 - ~/.yarn/bin/yarn
npm: 6.9.0 - ~/.asdf/shims/npm
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Jenkins - HTML Publisher Plugin - No CSS is displayed when ...
If I download the report to local, I am able to see the CSS formatting. Is there a setting in Jenkins which allows...
Read more >CSS tutorial starting with HTML + CSS - W3C
This short tutorial is meant for people who want to start using CSS and have never written a CSS style sheet before.
Read more >JavaScript : HTML form - Checking for non empty - w3resource
Javascript function to check if a field in a html form is empty or not.
Read more >4. Creating a Simple Page: (HTML Overview) - Learning Web ...
Learn the basic structure of an HTML document. Get a first glimpse of a style sheet in action. Don't worry about learning the...
Read more ><table>: The Table element - HTML - MDN Web Docs - Mozilla
The HTML element represents tabular data — that is, information presented in a two-dimensional table comprised of rows and columns of cells ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@areel please add
"extension": [".ts"]to yournycconfiguration. This is required in nyc@14 otherwise.tsfiles will be filtered out of the report. Note that this will be fixed in nyc@15, unfortunately we could not expand the defaultextensionlist in nyc@14 due to concern that it might break something.Can confirm that worked, thanks to both of you for your time.