swc-project / jest

Super-fast alternative for babel-jest or ts-jest without type checking. Please use main repository for issues
757 stars 37 forks source link

`@swc/jest` is has nothing to do with `/node_modules/` problem #162

Closed devjiwonchoi closed 1 year ago

devjiwonchoi commented 1 year ago

For example, a well-known issue with node-fetch and jest.

import http from 'node:http'; ^^^^^^ SyntaxError: Cannot use import statement outside a module

The general solution is to use webpack or babel, but I'd like to know if it'd be possible for @swc/jest can handle it also.

kdy1 commented 1 year ago

Of course it's possible

devjiwonchoi commented 1 year ago

@kdy1 If you don't mind, can you provide any docs or keywords I can look up to?

kdy1 commented 1 year ago

https://jestjs.io/docs/configuration#transformignorepatterns-arraystring

devjiwonchoi commented 1 year ago

Thank you!