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.

No coverage report for JSX file

See original GitHub issue

Link to bug demonstration repository

https://github.com/Quoin/react-utils/tree/master/src

Expected Behavior

I expect to see code coverage for the JSX file

Observed Behavior

The test output the test for the JSX file (in this case error-boundary.jsx), but in the coverage report, I don’t see it. It is neither in the summary nor in the html output. (reports/coverage/index.html).

I know the test is run because of this output:

  src/error-boundary
    ✓ should be a function with 1 param

Troubleshooting steps

  • still occurring when I put cache: false in my nyc config

  • npm ci

  • npm run coverage && npm run coverage-report

Environment Information

# paste the output here
  System:
    OS: macOS 10.15.1
    CPU: (8) x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
    Memory: 551.17 MB / 16.00 GB
  Binaries:
    Node: 8.12.0 - ~/.nvm/versions/node/v8.12.0/bin/node
    Yarn: 1.19.2 - /usr/local/bin/yarn
    npm: 6.13.2 - ~/.nvm/versions/node/v8.12.0/bin/npm
  npmPackages:
    @babel/cli: ~7.7.5 => 7.7.5
    @babel/core: ~7.7.5 => 7.7.5
    @babel/preset-env: ~7.7.6 => 7.7.6
    @babel/preset-react: ~7.7.4 => 7.7.4
    @babel/register: ~7.7.4 => 7.7.4
    nyc: ~14.1.1 => 14.1.1

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
coreyfarrellcommented, Dec 11, 2019

This is just the way github and npm work. Development happens on github, releases are published to npm. This is not something I can solve without unacceptable burden on the release process.

0reactions
quoininc-huudatrancommented, Dec 11, 2019

Oh, I see. Sorry, I was expecting master to be the official version (because it is said: npm i -D nyc which install latest) instead of a next version. My bad.

Would be great that version is displayed at the top of the README, and have links to older versions (create a branch from your latest tag 14.1.1). That would be really helpful instead of relying on external (npmjs).

Thanks,

Read more comments on GitHub >

github_iconTop Results From Across the Web

Coverage report not working · Issue #7838 - GitHub
I should see the coverage report including the App.js file. Actual behavior. I see no file included in the report: image. Reproducible demo....
Read more >
Code coverage on JSX tests with Istanbul - Stack Overflow
My tests use the babel-rewire-plugin , and gulp-jsx-coverage was not instrumenting my files correctly, resulting in a coverage report that included a bunch ......
Read more >
Code coverage not shown in the UI for Javascript application
Hello, I try to analyse a React Native project with Sonarcloud. ... The analysis works well but I do not have any coverage...
Read more >
Running Tests | Create React App
Coverage Reporting ​. Jest has an integrated coverage reporter that works well with ES6 and requires no configuration. Run npm test -- --coverage...
Read more >
Running tests and creating code coverage reports for React ...
I originally wanted to have the code coverage report parsed by JaCoCo so the Jenkins job list can show the total number of...
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