DEV Community

Cover image for Ng-News: Episode 22/33
Rainer Hahnekamp
Rainer Hahnekamp

Posted on

Ng-News: Episode 22/33

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.
ChangeLog: https://github.com/ngrx/platform/blob/master/CHANGELOG.md

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.

ChangeLog: https://github.com/angular/angular/releases

Top comments (0)