Replies: 3 comments
-
I found this example in the meanwhile: Do I understand right that ESM is totally optional and it's not needed altogether? I mean even if the source files contain ES imports the following option:
Will make sure everything works with the default preset? |
Beta Was this translation helpful? Give feedback.
-
OK, I think I made a kind of minimal reproducible case:
That's it. It reproduces all the problems I'm encountering. Can you tell me what config should I use for this use-case? |
Beta Was this translation helpful? Give feedback.
-
I managed to solve almost everything, except for one library: formulajs I can import formulajs@3.0.0 via node, but not via ts-jest. I'm trying this one, as per the homepage:
The 3.0.0 release is super new, just came out today, so if there is something what the author should do differently I think we can give feedback to them. I don't have the knowledge about ESM library internals to tell them, but if you could have a look at what's wrong with |
Beta Was this translation helpful? Give feedback.
-
Hi, I've been trying everything, following the advice on https://kulshekhar.github.io/ts-jest/docs/guides/esm-support but I still couldn't make ESM in TS work.
How would you test a .ts file which starts like this?
I'm confused about the 6 presets as well.
tsc
runs perfectly with this tsconfig.json:What direction would you recommend me going into? It's not clear to me if I even need ES modules or not? I mean for testing I could just compile with "es5" target, could I not?
Beta Was this translation helpful? Give feedback.
All reactions