You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
at foo (src/app.ts:2:9)
at Object. (src/app.test.ts:5:14)
Expected behavior
On 4: the stack of error says "bootstrap.ts:4", should be "bootstrap.ts:2" like the one on 6.
(On 9: the stack of error has the right line number.)
Actual behavior
The line number of error stack from a typescript global setup is wrong, and it seems because no inline source map, the line number is from the js compiled from ts.
Debug log
{"context":{"allowJs":false,"logLevel":20,"namespace":"jest-preset","package":"ts-jest","version":"29.1.1"},"message":"creating jest presets not handling JavaScript files","sequence":1,"time":"2023-10-22T12:54:57.768Z"}
{"context":{"allowJs":false,"logLevel":20,"namespace":"jest-preset","package":"ts-jest","version":"29.1.1"},"message":"creating jest presets not handling JavaScript files","sequence":2,"time":"2023-10-22T12:54:57.774Z"}
{"context":{"logLevel":20,"namespace":"Importer","package":"ts-jest","version":"29.1.1"},"message":"creating Importer singleton","sequence":3,"time":"2023-10-22T12:54:58.172Z"}
Version
29.7.0
Steps to reproduce
Error: Jest: Got error running globalSetup - C:\Users\fysntian\Workspace\jest-demo\src\global-setup.ts, reason: bootstrap error
at bootstrap (C:\Users\fysntian\Workspace\jest-demo\src\bootstrap.ts:4:11)
Error: bootstrap error
at bootstrap (C:\Users\fysntian\Workspace\jest-demo\src\bootstrap.ts:2:9)
Comment "throw new Error('bootstrap error');" at src/bootstrap.ts@2
npm test
Get the test failure with stack:
foo error
1 | async function foo() {
at foo (src/app.ts:2:9)
at Object. (src/app.test.ts:5:14)
Expected behavior
On 4: the stack of error says "bootstrap.ts:4", should be "bootstrap.ts:2" like the one on 6.
(On 9: the stack of error has the right line number.)
Actual behavior
The line number of error stack from a typescript global setup is wrong, and it seems because no inline source map, the line number is from the js compiled from ts.
Debug log
{"context":{"allowJs":false,"logLevel":20,"namespace":"jest-preset","package":"ts-jest","version":"29.1.1"},"message":"creating jest presets not handling JavaScript files","sequence":1,"time":"2023-10-22T12:54:57.768Z"}
{"context":{"allowJs":false,"logLevel":20,"namespace":"jest-preset","package":"ts-jest","version":"29.1.1"},"message":"creating jest presets not handling JavaScript files","sequence":2,"time":"2023-10-22T12:54:57.774Z"}
{"context":{"logLevel":20,"namespace":"Importer","package":"ts-jest","version":"29.1.1"},"message":"creating Importer singleton","sequence":3,"time":"2023-10-22T12:54:58.172Z"}
Additional context
No response
Environment
The text was updated successfully, but these errors were encountered: