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

migrate the ng test suites to jest #152

Open
zijianhuang opened this issue Apr 10, 2024 · 2 comments
Open

migrate the ng test suites to jest #152

zijianhuang opened this issue Apr 10, 2024 · 2 comments

Comments

@zijianhuang
Copy link
Owner

zijianhuang commented Apr 10, 2024

https://github.com/karma-runner/karma#karma-is-deprecated-and-is-not-accepting-new-features-or-general-bug-fixes

===========================

so Angular is adding Jest and Web Test Runner support to provide a migration path off of Karma. See the Angular blog for more details.

Critical security issues in Karma will still be triaged and fixed as necessary. This will continue until 12 months after Angular CLI's Web Test Runner support is marked stable.

For those outside Angular looking to migrate off Karma, both Web Test Runner and jasmine-browser-runner provide browser-based unit testing solutions which can be used as a direct alternative. Jest and Vitest also provide Node-based alternatives.

============================

@zijianhuang
Copy link
Owner Author

zijianhuang commented Apr 19, 2024

Web Test Runner is preferable because of testing CORS in integration test suites. However, as of today, on https://angular.dev/ and angular.io, the tutorials about testing is still using Karma.

https://modern-web.dev/guides/test-runner/typescript/
https://modern-web.dev/docs/test-runner/cli-and-configuration/
https://modern-web.dev/docs/dev-server/plugins/esbuild/

@zijianhuang
Copy link
Owner Author

As of today, NG team hasn't figure out the solutions, since jest is basically Node based, while browser based test is important too.

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

1 participant