Test-Driving JavaScript Applications
Test-Driving JavaScript Applications
Author: Dr. Venkat Subramaniam
Publisher: Pragmatic Bookshelf
Pages: 320
ISBN: 978-1680501742
Print: 1680501747
Kindle: B01MQGX4CA
Audience: JavaScript programmers
Rating: 4
Reviewer: Kay Ewbank

This is a book that looks at how to use automated testing to improve the quality of your code. 

The book is subtitled Rapid, Confident, Maintainable Code, and it looks at how a number of automated testing tools can be used, including Karma, Mocha, Chai, Istanbul,Sinon and Protractor. The opening chapter discusses why automated testing and verification is a good idea. The author then moves on to an example showing the steps for creating tests for server-side and client-side code, creating test lists and looking at how to implement the minimum code for one test at a time. 

Banner

The next chapter looks at how to test asynchronous functions, after  which there's an interesting chapter on tackling dependencies. The advice is to remove them where possible, and to decouple and replace dependencies with test doubles to make testing easier.

By Chapter 5 the author has moved on to looking at Node.js applications and how to work out how much of the code the automated tests can verify. The next chapters look at testing database connections, model functions, routes functions, DOM and JQuery.

 

Ways to tests Angular.JS are next on the agenda. The techniques are interesting - for Angular.JS 1.x, the suggestion is to create another version of the client side for the Express application, while for Angular 2, the author suggest recreating the client side using Angular 2 and JavaScript.

Knowing what to test is the real skill in testing, and there's a chapter suggesting important areas to test, and what should be avoided. The book ends with a chapter on putting everything together.

This is a good introductions to the various testing tools, and some of the suggestions for ways to test made me think about better ways to test my own code. An interesting read.

 

Related Reviews

Test-Driven JavaScript Development

Maintainable JavaScript

 

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on, Twitter, FacebookGoogle+ or Linkedin.

Banner


Raspberry Pi Hacks

Author: Ruth Suehle & Tom Callaway
Publisher: O'Reilly
Pages: 364
ISBN: 9781449362348
Print: 1449362346
Kindle: B00KBAS0CE

Audience: Pi enthusiasts, but not beginners
Rating: 5
Reviewer: Harry Fairhead

A total of 65 Raspberry Pi hacks - surely they have all been done before? Well yes [ ... ]



PowerShell for SQL Server Essentials

Author: Donabel Santos
Publisher: Packt Publishing
Pages: 183
ISBN: 978-1784391492
Print: 1784391492
Kindle: B00U1D9WTQ
Audience: Administrators and developers
Rating: 4.0
Reviewer: Ian Stirk

This book aims to introduce you to PowerShell and how it can be used with SQL Server. How well does  [ ... ]


More Reviews

 
 

   
Banner
Banner
RSS feed of book reviews only
I Programmer Book Reviews
RSS feed of all content
I Programmer Book Reviews
Copyright © 2017 i-programmer.info. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.