Open AlonMiz opened 2 years ago
I confirm it is not working
In my case, the following 3 steps did correct coverage highlight lines.
Pass a sourcemap option to esbuild-jest
// jest.config.js
transform: {
'^.+\\.(t|j)sx?$': ['esbuild-jest', { sourcemap: true }]
},
Install @babel/preset-typescript
npm i -D @babel/preset-typescript
Put this babel.config.js in the top directory
// babel.config.js
// See: https://github.com/aelbore/esbuild-jest/issues/21
module.exports = {
presets: ['@babel/preset-typescript']
};
Hope this helps someone.
while migrating from
ts-jest
toesbuild-jest
we noticed there's an issue with source maps. source maps when debugging (vscode/webstorm) and error logs are off by lines. we had to migrate back to the slow ts-loader for now :/I saw this https://github.com/aelbore/esbuild-jest/issues/9 issue was fixed but unfortunately we are still experiencing the same issue
versions are all up to date
esbuild-jest: 0.5.0
esbuild": 0.13.12