Skip to content

Reproducing a race condition in babel-jest

Notifications You must be signed in to change notification settings

stipsan/jest-identical-files-coverage-bug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jest coverage bug with identical files

Run the following command twice:

$ npm test -- --coverage

Expected:

------------|----------|----------|----------|----------|----------------|
File        |  % Stmts | % Branch |  % Funcs |  % Lines |Uncovered Lines |
------------|----------|----------|----------|----------|----------------|
All files   |      100 |      100 |      100 |      100 |                |
 a          |      100 |      100 |      100 |      100 |                |
  Header.js |      100 |      100 |      100 |      100 |                |
 b          |      100 |      100 |      100 |      100 |                |
  Header.js |      100 |      100 |      100 |      100 |                |
------------|----------|----------|----------|----------|----------------|

Actual

------------|----------|----------|----------|----------|----------------|
File        |  % Stmts | % Branch |  % Funcs |  % Lines |Uncovered Lines |
------------|----------|----------|----------|----------|----------------|
All files   |     12.5 |        0 |    33.33 |       25 |                |
 a          |      100 |      100 |      100 |      100 |                |
  Header.js |      100 |      100 |      100 |      100 |                |
 b          |        0 |        0 |        0 |        0 |                |
  Header.js |        0 |        0 |        0 |        0 |         1,5,10 |
------------|----------|----------|----------|----------|----------------|

About

Reproducing a race condition in babel-jest

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published