Setting up a test infrastructure

As we saw previously in this chapter when we talked about unit tests, usually, testing requires being able to isolate the individual software component of our applications.

In order to be able to isolate the components of our application, we will need to adhere to some principles (such as the dependency inversion principle) that will help us to increase the level of decoupling between the components.

We will now configure a testing environment using Gulp and Karma and write some automated test using Mocha and Chai. By the end of this chapter, we will know how writing unit tests can help us to increase the level of decoupling and isolation between the components of an application, and how they can lead us to the development ...

Get TypeScript: Modern JavaScript Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.