Closed volkanunsal closed 3 years ago
The workaround for your issue is adding to transformIgnorePatterns
something like this
transformIgnorePatterns: [`/node_modules/(?!${esModules})`, '/node_modules/@apollo/client/utilities/utilities.cjs.js'],
Since utilities.cjs.js
is already in CommonJS format so it doesn't have to be processed by ts-jest
anymore. The same to other files .cjs.js
🐛 Bug Report
I am getting this error when I configure ts-jest to process a ESM module with the .js extension.
To Reproduce
Steps to reproduce the behavior:
This is my
jest.config.js
fileAnd my
tsconfig.test.json
file:Expected behavior
I expect the file to compile.
Here is the repo. Use yarn to install the dependencies and run the tests under
packages/aws-appsync
https://github.com/volkanunsal/aws-mobile-appsync-sdk-js
envinfo
TS_JEST_LOG:
It gets cut off. So I'm copying the last line, which seems to be the most relevant.