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.

Tracking the coverage create empty table for index.html

See original GitHub issue

Hi, I am following steps mentioned under “Tracking the coverage”, I got nyc, babel-istanbul installed, updates the jest-playwright.config.js and all other required config files. I could able to run sample test and see the coverage folder with index.html gets created but what i see is the html has empty table. I intentionally make my test fail so i could see the coverage.

I attached all my config files here for reference, wondering if i missing anything and messing it up by installing too many unnecessary\duplicate things.

I also see error message below after execution>> Thanks in advance.

// .babelrc
{
    "env": {
      "test": {
        "plugins": [ "istanbul" ]
      }
    }
  }

_Ran all test suites. Archive.zip

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @ test: jest npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @ test script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /Users/khobraj/.npm/_logs/2020-07-31T20_12_16_013Z-debug.log ----------|---------|----------|---------|---------|-------------------

File % Stmts % Branch % Funcs % Lines Uncovered Line #s
All files 0 0 0 0
---------- --------- ---------- --------- --------- -------------------
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ coverage: nyc npm run test
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ coverage script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /Users/khobraj/.npm/logs/2020-07-31T20_12_16_118Z-debug.log

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mxschmittcommented, Aug 4, 2020

Hi sorry for the late response. What kind of build system are you using for the your client side code? I you haven’t seen, we have a full working example located here: https://github.com/playwright-community/playwright-jest-examples/tree/master/create-react-app-coverage

0reactions
ajaykhobragadecommented, Aug 5, 2020

@mxschmitt , okay to close ticket unless there is anything more to add.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Coverage in HTML view is broken · Issue #9388 · facebook/jest
When opening the coverage/lcov-report/index.html the HTML does not show the coverage report numbers. Screenshot. GIT repo here: https://github.
Read more >
Release 7.0.0b1 unknown - Coverage.py
Coverage.py can annotate your source code to show which lines were executed and which were not. The html command creates an HTML report...
Read more >
How To Generate Code Coverage Report Using JaCoCo ...
In this tutorial, you will learn about generating code coverage reports using the JaCoCo-Maven plugin.
Read more >
Test coverage visualization - GitLab Docs
With the help of GitLab CI/CD, you can collect the test coverage information of your favorite testing or coverage-analysis tool, and visualize this ......
Read more >
Empty table with coverages files - Stack Overflow
Can anyone tell me why the file test coverage table is always empty, while the tests pass? It doesn't matter in which mode...
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