esbuild-jest icon indicating copy to clipboard operation
esbuild-jest copied to clipboard

Incorrect Jest coverage

Open dfantonio opened this issue 1 year ago • 2 comments

When using esbuild-jest to transpile ts to commonjs and running jest --coverage certain branches are shown as not covered. Using babel to transpile and run the tests shows the correct coverage.

With esbuild-jest: image

With babel: image

dfantonio avatar Sep 15 '22 13:09 dfantonio

@dfantonio adding sourcemap: true to esbuild-jest options fixes coverage for me

wit1312 avatar Oct 07 '22 22:10 wit1312

@wit1312 Thanks for the good information! Fixed!

munepom avatar Apr 21 '23 09:04 munepom