less than 1 minute read

Generate test coverage: npm run test -- --coverage --coverageReporters=text

npm test -- --coverage --coverageReporters=text

> test-driven-fizzbuzz@1.0.0 test
> jest --coverage --coverageReporters=text

 PASS  ./index.test.js
 PASS  ./greeting.test.js
----------|----------|----------|----------|----------|-------------------|
File      |  % Stmts | % Branch |  % Funcs |  % Lines | Uncovered Line #s |
----------|----------|----------|----------|----------|-------------------|
All files |       75 |       50 |      100 |       75 |                   |
 index.js |       75 |       50 |      100 |       75 |                 5 |
----------|----------|----------|----------|----------|-------------------|

Running jest tests automatically: npx jest --watchAll

PASS  ./greeting.test.js
 PASS  ./index.test.js

Test Suites: 2 passed, 2 total
Tests:       2 passed, 2 total
Snapshots:   0 total
Time:        0.562s, estimated 1s
Ran all test suites.

Watch Usage
 › Press f to run only failed tests.
 › Press o to only run tests related to changed files.
 › Press q to quit watch mode.
 › Press t to filter by a test name regex pattern.

Tags:

Updated:

Comments