aelbore / esbuild-jest

A Jest transformer using esbuild
519 stars 51 forks source link

Incorrect Jest coverage #79

Open dfantonio opened 2 years ago

dfantonio commented 2 years ago

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

wit1312 commented 1 year ago

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

munepom commented 1 year ago

@wit1312 Thanks for the good information! Fixed!