OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Jest watch with code coverage not working

  • Thread starter Thread starter codemon
  • Start date Start date
C

codemon

Guest
I'm trying to run jest --coverage --watch so that I only get the coverage for whatever component I'm writing tests for and I can see the increased coverage as I write more tests. But while the modified tests are successfully picked up and run, the coverage report comes up empty.

Code:
----------|----------|----------|----------|----------|-------------------|
File      |  % Stmts | % Branch |  % Funcs |  % Lines | Uncovered Line #s |
----------|----------|----------|----------|----------|-------------------|
All files |        0 |        0 |        0 |        0 |                   |
----------|----------|----------|----------|----------|-------------------|


Test Suites: 2 passed, 2 total
Tests:       2 passed, 2 total
Snapshots:   0 total
Time:        5.599s
Ran all test suites related to changed files.

The documentation on this is almost zero, but it seems like it should work according to this pr: https://github.com/facebook/jest/pull/5601

<p>I'm trying to run <code>jest --coverage --watch</code> so that I only get the coverage for whatever component I'm writing tests for and I can see the increased coverage as I write more tests. But while the modified tests are successfully picked up and run, the coverage report comes up empty.</p>

<pre><code>----------|----------|----------|----------|----------|-------------------|
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
----------|----------|----------|----------|----------|-------------------|
All files | 0 | 0 | 0 | 0 | |
----------|----------|----------|----------|----------|-------------------|


Test Suites: 2 passed, 2 total
Tests: 2 passed, 2 total
Snapshots: 0 total
Time: 5.599s
Ran all test suites related to changed files.
</code></pre>

<p>The documentation on this is almost zero, but it seems like it should work according to this pr: <a href="https://github.com/facebook/jest/pull/5601" rel="noreferrer">https://github.com/facebook/jest/pull/5601</a></p>
 

Latest posts

I
Replies
0
Views
1
impact christian
I
Top