Angular comes with another very important testing utility. So far, we have only tested the component class of our components. However, as soon as we need to test components and their behaviors in our application, a few more things will be involved:
- Testing the view of components: It's sometimes required that we test the rendered view of components. With all of the bindings in our view, dynamic instantiation using template directives and content projection, it can be hard to write deterministic tests.
- Testing change detection: As soon as we update our model in our component class, we will want to test the updates that are performed via change detection. This involves the whole change detection behavior of our components.
- User interaction: Our component templates probably contain a set of event bindings, which trigger some behaviors...