Skip to content

A demo project showing that the coverage report does not show the line number missing coverage

Notifications You must be signed in to change notification settings

ccreighton-apptio/coverage-missing-line-number

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Missing Coverage Line Number Demo

This demonstrates a scenario where missing function coverage is reported without a line number.

Running

yarn install; yarn test

Output

----------------------|---------|----------|---------|---------|-------------------
File                  | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
----------------------|---------|----------|---------|---------|-------------------
All files             |   88.88 |      100 |   83.33 |     100 |                   
 LocalFunctionCall.ts |   88.88 |      100 |   83.33 |     100 |                   
----------------------|---------|----------|---------|---------|-------------------
Jest: "global" coverage threshold for statements (100%) not met: 88.88%
Jest: "global" coverage threshold for functions (100%) not met: 83.33%
Test Suites: 1 passed, 1 total
Tests:       1 passed, 1 total
Snapshots:   0 total
Time:        0.876 s, estimated 1 s
Ran all test suites.

Expected Output

----------------------|---------|----------|---------|---------|-------------------
File                  | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
----------------------|---------|----------|---------|---------|-------------------
All files             |   88.88 |      100 |   83.33 |     100 |                   
 LocalFunctionCall.ts |   88.88 |      100 |   83.33 |     100 | 32                
----------------------|---------|----------|---------|---------|-------------------
Jest: "global" coverage threshold for statements (100%) not met: 88.88%
Jest: "global" coverage threshold for functions (100%) not met: 83.33%
Test Suites: 1 passed, 1 total
Tests:       1 passed, 1 total
Snapshots:   0 total
Time:        0.876 s, estimated 1 s
Ran all test suites.

About

A demo project showing that the coverage report does not show the line number missing coverage

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published