O'Reilly logo

Mastering JavaScript Single Page Application Development by John Moore, Philip Klauzinski

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 13. Testing with Mocha, Karma, and More

Testing is an integral part of software development, especially when dealing with applications that interact with end-users and various clients, as is the case with JavaScript SPAs. The results of web application code can often be unpredictable due to the variety of clients potentially consuming the application, so all possible scenarios should be accounted for and tested appropriately.

In this chapter, we will cover the following topics:

  • What is unit testing, integration testing, and end-to-end (E2E) testing?
  • How to perform JavaScript unit testing with Mocha, Chai, and Sinon.js
  • How to configure Karma with Jasmine to test AngularJS
  • How to perform unit testing with AngularJS
  • How to perform end-to-end testing ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required