question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Empty html report using version 14+ (fine with v13 and below)

See original GitHub issue

Link 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: false in 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:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
coreyfarrellcommented, Jul 3, 2019

@areel please add "extension": [".ts"] to your nyc configuration. This is required in nyc@14 otherwise .ts files will be filtered out of the report. Note that this will be fixed in nyc@15, unfortunately we could not expand the default extension list in nyc@14 due to concern that it might break something.

0reactions
areelcommented, Jul 3, 2019

Can confirm that worked, thanks to both of you for your time.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found