Open grosch opened 2 years ago
Yes, the Jest builder will support ESM. However, it's not a small task so it will require some time.
@just-jeb Any ETA on when this might happen?
No specific ETA, sorry. The best ETA I can give is that it will be ready when I have time for it. A contribution is the best way to make it happen faster, so if you'd like to take a shot I'd love to provide guidance and assistance on this.
Hmm, any help you need here? Wondering if we can get this working easier now since Angular moves more and more to ESM configuration with verbatim modules.
Ok... just found out... using vitest is just... a no brainer :D had to switch just insane (didnt even needed to adjust any test spec). Copied most of the code from AnalogJS and use their manuall installation but it works super smooth. One just need to make sure to install the exact same vite version as @angular/build
installs. (https://analogjs.org/docs/features/testing/vitest#setup-for-running-tests-for-node)
With Angular 14 and jest-preset-angular 12 it's now possible to get pretty far along the ESM path. Will this be upgraded to give me an option to use that instead of the commonjs versions?
In the jest-preset-angular packages there's an examples/examples-v14 directory where you can see the versions of the files with the -esm path component in them.