Episode 22/33

ng-news
ng-news
Published in
2 min readAug 23, 2022

Cypress Component Test Runner

We have a new way how to write component tests in Angular. So in a component test, we use the DOM to interact with the actual component. These kind of tests are very hard because you have to manage asynchrony, change detection and sometimes even manually dispatch certain DOM events. Until now, Jest and Karma were the testing frameworks we could use for that.

On the other side, we have E2E frameworks, like Cypress. Writing those kind of tests are much easier but the tests always were executed against a running application. So it is not possible to test a single component in isolation.

Since last week, Cypress supports component tests in Angular. You can see this as the best of both worlds. It combines the possibility to test components in isolation with the easiness of Cypress.

This feature is still in beta status. Expect some bugs which will be resolved very soon. If you use nx, an alternative to the Angular CLI, then you have to wait a little bit. But nx integration is already a priortized issue.

For more information, Cypress provides an excellent documentation. You can also look out for Jordan Powell’s videos on YouTube and — shameless self-promotion — watch my own video also on YouTube.

NgRx 14.2

We had a minor version upgrade for NgRx, a state management library, to 14.2.

Angular 14.2 Release Candidate

And for the next minor of Angular itself, also 14.2, we have the first release candidate. According to the changelog, it looks like we can expect quite a lot of new features.

--

--

ng-news
ng-news

Published in ng-news

ng-news is published on a weekly basis. It brings you the latest updates from the Angular community. ng-news is curated which means it focuses only on the most important topics. It also comes with additional explanations and analyses.