Chapter 8. Testing JavaScript components

This chapter covers

  • Applying unit testing fundamentals to JavaScript components
  • Writing unit tests in Tape
  • Mocking, spying, and proxying
  • Testing browsers hands-on
  • Using Grunt for test automation
  • Understanding integration and visual testing

By writing tests, you’ll improve the reliability of the modules and applications you build and insure they work the way you intend. In typical Build First fashion, you’ll get the necessary insight to automate those tests and run them on the cloud. This chapter includes a few guidelines that will help you write tests, and you will also get hands-on experience in testing components. In some cases I’ll walk you through the tests that you may write for a given ...

Get JavaScript Application Design 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.