...

/

Testing and Test Driven Development

Testing and Test Driven Development

Let's explore why testing and test-driven development are important and why we use Jasmine for writing tests in Angular.

Why is Test-driven development important?

In the world of Angular, testing is extremely important. As we know from when we explored the Dependency Injection (DI) in Dependency Injection, Services, and HttpClient chapter, data is passed into our Components using DI. This leads to our components being isolated and separated, which is good practice. It does mean that we need to be sure that the inputs to our Components work as expected. Being able to test parts of our application in isolation is important because then we know that when all the various parts are passed into the components, they work. This is why ...