Open asnaseer opened 2 months ago
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.
I am still looking for a solution to this please
I just tried the same scenarios with these updated libs and still get the same error:
"@types/jest": "^29.7.0",
"jest-extended": "^4.0.2",
"ts-jest": "^29.2.5",
"typescript": "^5.6.2"
Version
29.7.0
Steps to reproduce
I have an Expo 50 React Native app and have some code that uses the Typescript
createSourceFile
method. If I call this method from a jest test then the test seems to hang for ever. Calling it directly via a Typescript script works just fine.Also, if I downgrade to Typescript 4.9.5 then the jest test passes.
These are the relevant packages I used:
Here is a minimal jest test to reproduce the error (in file
src/broken.spec.ts
):I use yarn 1.22.10 to run the test.
Here is a minimal Typescript script that works just fine when run with
npx ts-node src/broken.ts
:Expected behavior
The test should not hang
Actual behavior
The test hangs
Additional context
No response
Environment