https://github.com/stipsan/jest-identical-files-coverage-bug
Reproducing a race condition in babel-jest
https://github.com/stipsan/jest-identical-files-coverage-bug
Last synced: 4 months ago
JSON representation
Reproducing a race condition in babel-jest
- Host: GitHub
- URL: https://github.com/stipsan/jest-identical-files-coverage-bug
- Owner: stipsan
- Created: 2017-09-05T22:15:48.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T05:42:47.000Z (over 1 year ago)
- Last Synced: 2025-01-11T23:43:44.097Z (6 months ago)
- Language: HTML
- Size: 64.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Jest coverage bug with identical files
Run the following command twice:
```bash
$ 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 |
------------|----------|----------|----------|----------|----------------|
```