CHAPTER 10

image

JavaScript Unit Testing

Unit testing is an important and crucial part of the development process. A unit test is a way to evaluate a unit, which is a small piece of code, and determine if it satisfies the relevant requirements. Unit tests help to create robust code that isn’t malfunctioning during runtime. They act as a safety net when developers continue to develop a feature and might make changes to existing features. Without unit tests, application developers can’t be sure that their changes haven’t broken the application logic and requirements.

Having automatic unit tests in any application is considered a best practice. Testing ...

Get Pro Single Page Application Development: Using Backbone.js and ASP.NET 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.