What this book covers
Chapter 1, Web Application Testing in the Modern Web, is an introduction to modern web development, showing how important the testing of increasingly complex applications is. In particular, it shows how the classic client-side development based on jQuery is no longer the best solution when unit testing becomes one of the pillars of the implementation strategy. Also, it suggests that a new design approach is needed, based on a JavaScript MV presentation design pattern.
Chapter 2, The Knockout.JS UI Framework Explained, covers the most important features of Knockout.JS, which is the most well-known JavaScript presentation pattern based on Model-View-ViewModel. It also shows how to effectively use this library in a web application and why this is a good choice in terms of unit testing and application design.
Chapter 3, The Jasmine Unit Testing Framework Explained, covers the most important features of Jasmine, a very well-known JavaScript unit testing framework, based on the Behavior Driven Development approach.
Chapter 4, Unit Testing Strategies, is the core chapter of the book. It shows how to strategically deal with the development of a JavaScript web application when unit testing plays a major role. It suggests some important design principles and approaches when developing a sample web application that uses Knockout.JS as the presentation framework and Jasmine for unit testing.
Chapter 5, Setting Up an Effective Testing Environment, shows how to set up an automated testing environment based on Gulp.JS and Karma; the first is a Node.JS module that acts as a task automation system, and the second is a test runner system. It covers the steps needed to install, configure, and execute all of the system components, including unit testing reports and code coverage. It also shows how to directly test the user interface using Phantom.JS and its page automation capabilities.