zijianhuang / webapiclientgen

Strongly Typed Client API Generators generate strongly typed client APIs in C# .NET and in TypeScript for jQuery and Angular 2+ from ASP.NET Web API and .NET Core Web API
MIT License
168 stars 38 forks source link

migrate the ng test suites to jest #152

Open zijianhuang opened 5 months ago

zijianhuang commented 5 months ago

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 commented 5 months ago

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 commented 5 months ago

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