swc-node
swc-node copied to clipboard
Top-level await support in @swc-node/jest
I use top-level await in TS, and it works fine, however, Jest tests importing modules with top-level await don't work. If they are supposed to work, let me know and I'll prepare a minimal broken demo, which works with TS but modules can't be tested with Jest, either with @swc-node/jest or with other methods. It is not clear where the problem lies, as of now. It could be swc, Jest or somewhere else. It may be related to #120 or not.
I encountered the same issue. It seems to me, @swc/jest (or @swc/core) ignore some settings in the tsconfig, like "module" or "target".