-
Notifications
You must be signed in to change notification settings - Fork 455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Seems ignore modules required using "require" #1274
Comments
Did you solve this issue? |
No, I could not solve it. |
hi @localnet , may I have the full link to clone/download your minimum repo ? |
Hi @ahnpnl, I am trying to reproduce it at current project, very similar, and all work well. I guess it was fixed at some new Thanks you. |
Been stuck for more than 5 hours with the same issue. Same scenario, tried everything, no idea what it is. Decided to not update Jest/TS-Jest/TypeScript for now. EDIT: It seems that the transformer is not working for TypeScript files required by the globalSetup script. By dissecting code, found out that Jest's 24.9.0 release broke this behavior, and jestjs/jest#8756 is the only relevant change that would cause this issue. |
Hi @ahnpnl, I am getting the same issue. This time you can found a repository to reproduce it here: Only run: |
Thanks for your repo @localnet , I will take a look when I have some free times |
Since this fix has been pushed back until Jest 27 (see jestjs/jest#8751) is there a temp fix I could use until then? My usecase is also TypeORM
Specifically, I assume when TypeORM loads entities when establishing a connection that it's using require for these ts files
|
Jest 27 is out 🎉 🎉 @ahnpnl worth reopening the issue? |
Issue :
ts-jest don't transform modules required using
require
.Expected behavior :
Transform modules required using
require
.Debug log:
log file content
Minimal repo :
jest.config.js:
tsconfig.json:
src/helpers/graphqlHelper.ts:
src/resolvers/pictureResolver.ts:
The text was updated successfully, but these errors were encountered: