Hello! I am having difficulties running my jest unit tests when transforming them with swc-node/jest. Is there something obvious that I am doing wrong? Any help is appreciated, thanks!
Test suite failed to run
failed to process input file
Caused by:
0: failed to open input source map file
1: No such file or directory (os error 2)
at Compiler.transformSync (node_modules/.pnpm/@swc+core@1.3.22/node_modules/@swc/core/index.js:241:29)
at transformSync (node_modules/.pnpm/@swc+core@1.3.22/node_modules/@swc/core/index.js:348:21)
at transformJest (node_modules/.pnpm/@swc-node+core@1.10.5_@swc+core@1.3.22/node_modules/@swc-node/core/index.ts:81:26)
at Object.process (node_modules/.pnpm/@swc-node+jest@1.5.5_@swc+core@1.3.22_typescript@4.3.5/node_modules/@swc-node/jest/index.ts:33:27)
at ScriptTransformer.transformSource (node_modules/.pnpm/@jest+transform@29.6.2/node_modules/@jest/transform/build/ScriptTransformer.js:542:31)
at ScriptTransformer._transformAndBuildScript (node_modules/.pnpm/@jest+transform@29.6.2/node_modules/@jest/transform/build/ScriptTransformer.js:671:40)
at ScriptTransformer.transform (node_modules/.pnpm/@jest+transform@29.6.2/node_modules/@jest/transform/build/ScriptTransformer.js:723:19)
Problem seems to be that it can't find transformJest and Object.process because it's looking for the index file in the wrong location.
Hello! I am having difficulties running my jest unit tests when transforming them with
swc-node/jest
. Is there something obvious that I am doing wrong? Any help is appreciated, thanks!jest.config.js
Error message:
Problem seems to be that it can't find
transformJest
andObject.process
because it's looking for the index file in the wrong location.