swc-project / swc-node

Faster ts-node without typecheck
MIT License
1.72k stars 71 forks source link

Confusing or incorrect jest test coverage #691

Closed stefee closed 1 year ago

stefee commented 1 year ago

Repro: https://github.com/stefee/swc-node-jest-repro-691 Logs: https://github.com/stefee/swc-node-jest-repro-691/actions/runs/4152246436/jobs/7183074878

Coverage from @swc/jest appears to be correct as L10 is not covered by tests:

--------------|---------|----------|---------|---------|-------------------
File          | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
--------------|---------|----------|---------|---------|-------------------
All files     |   94.44 |      100 |     100 |   94.44 |                   
 date-time.ts |   94.44 |      100 |     100 |   94.44 | 10                
--------------|---------|----------|---------|---------|-------------------

Coverage from @swc-node/jest appears to be incorrect as L23 is covered by tests:

--------------|---------|----------|---------|---------|-------------------
File          | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
--------------|---------|----------|---------|---------|-------------------
All files     |   95.45 |     92.3 |     100 |   95.23 |                   
 date-time.ts |   95.45 |     92.3 |     100 |   95.23 | 23                
--------------|---------|----------|---------|---------|-------------------