Chapter 7. Application Testing

In this chapter, we are going to take a look at how to write unit tests for TypeScript applications. We will see how to use tools and frameworks to facilitate the testing process of our applications.

The contents of this chapter cover the following topics:

  • Setting up a test infrastructure
  • Testing planning and methodologies
  • How to work with Mocha, Chai, and Sinon.JS
  • How to work with test assertions, specs, and suites
  • Test spies
  • Test stubs
  • Testing on multiple environments
  • How to work with Karma and PhantomJS
  • End-to-end testing
  • Generating test coverage reports

We will get started by installing some necessary third-party software dependencies.

Software testing glossary

Across this chapter, we will use some concepts that may not be ...

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.