Tag: angular
All the articles with the tag "angular".
Understanding the Optional Chaining Operator in JavaScript, TypeScript, and Angular
Published: at 12:00 AMThe optional chaining operator is a powerful tool in a developer's arsenal. It streamlines code, improves readability, and prevents potential errors. As with all tools, understanding its purpose and proper usage is key.
Mocking out Angular's ActivatedRoute for Unit Tests
Published: at 02:02 AMI've been writing a ton of unit tests and snapshot tests lately. While doing so, I have had to mock out a few things. This includes the `ActivatedRoute`. So let's say we have the following component.
Angular and Jest
Published: at 09:54 PMThe Angular CLI ships with Jasmine and Karma to run unit tests. However, out of the box, the unit tests are a bit slow for my tastes. Using [Jest](https://jestjs.io/) for our unit tests speeds things up and only runs the tests when the component has been changed.