Hazem Saleh sets the book up in the first chapter by emphasizing the WHY around JS unit testing, their purpose in a code-base and how they should be written/designed. If you are a seasoned programmer with a solid unit test writing habit, this chapter is less useful, and you can proceed to the next few chapters. The author also introduces the reader to an appropriate sample application that gives us a canvas on which to apply the fundamentals and variety of Unit Test tools and frameworks in subsequent chapters. The example is a classic weather-oriented one, yet complex enough to put the power and need for JS unit testing into perspective.
Chapters 2-5 walk you through some of the most prominent tools for JS unit testing available today: Jasmine, YUI Test, Q Unit and JSTD. Each one has its own quirks and idiosyncrasies that are competently elaborated upon and applied to the Weather Application sample by the Author. Two other aspects I liked about the book were (1) the Author’s care to include configuration instructions and architecture reviews for frameworks that had some pre-preparation required before you could get into them (2) the progression from some of the lighter-weight frameworks (Jasmin) to the most complex and comprehensive (JSTD). JSTD is a natural capstone chapter for the book given that it has the ability to integrate the other frameworks within its Test Run suite.
All in all, an essential book if you are a good JS developer looking to become great at what you do, and perhaps lead a team in writing orderly and well engineered code on what is the heart of the web today!”
The book on PacktPub: