News for hackers. Stuff that matters.
Re:Angular 13 by oblio on Thursday November 04, 2021 @06:14AM (#29105276)
How is the angular internationalization and automated testing story? Last time I looked at it (v3 or v4, I think), it was still half baked, especially in comparison with AngularJS.

I imagine it's settled by now?

Re:Angular 13 by veidr on Thursday November 04, 2021 @10:17AM (#29107480)
The i18n has apparently progressed (can't speak to it, though; we're still using ngx-translate, without which Angular life would have gone to Hard Mode) but the testing (and also debugging runtime errors) story is still the utter trash fire that it's always been.

"Unit" or "component" testing works, but there is tons of boilerplate required in real-world situations, which will often only become obvious after you try to run your tests, so it is tedious to write.

Protractor (the previous Angular-sanctioned E2E test framework) really died with AngularJS, so it's been a pretty unworkable and high-maintenance mess this whole time, and they only just now finally came to terms with this and killed it. (Also didn't replace it.)

P.S.:

From grievous and traumatic personal experience: Don't use Cypress. Use Playwright[1]. Cypress was great in 2017 of you were coming from Selenium/Protractor. But Playwright in 2021 is to Cypress what Cypress was to Selenium in 2017.

[1] https://playwright.dev

Re:Angular 13 by av8avenger on Thursday November 04, 2021 @06:32AM (#29105377)
The provided i18n library is really good, but it lacks tooling around it (like proper extraction of keys, meanings, descriptions, etc..).

Unit testing works flawlessly out of the box with Karma and live reloading, E2E needs a bit of setup, especially if you want to go with Cypress instead of Protractor.

For most use cases its ready to use and for everything else there will almost always be some articles on how to achieve it (i.e. E2E with Cypress).

Re:Angular 13 by oblio on Thursday November 04, 2021 @07:39AM (#29105803)
> The provided i18n library is really good, but it lacks tooling around it (like proper extraction of keys, meanings, descriptions, etc..).

Ah, damn, so it hasn't progressed much, if I'm not mistaken. They should really invest in that. I wonder how Google uses it internally, in this case.