Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESM modules #1226

Open
grosch opened this issue Jun 24, 2022 · 5 comments
Open

ESM modules #1226

grosch opened this issue Jun 24, 2022 · 5 comments

Comments

@grosch
Copy link

grosch commented Jun 24, 2022

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.

@just-jeb
Copy link
Owner

Yes, the Jest builder will support ESM. However, it's not a small task so it will require some time.

@grosch
Copy link
Author

grosch commented Jan 9, 2023

@just-jeb Any ETA on when this might happen?

@just-jeb
Copy link
Owner

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.

@muuvmuuv
Copy link

muuvmuuv commented Aug 5, 2024

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.

@muuvmuuv
Copy link

muuvmuuv commented Aug 5, 2024

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants