Book Review: Testable JavaScript

 Testable JavaScript Book Review

Testable JavaScript

By Mark Ethan Trostler
Publisher: O’Reilly Media
Released: January 2013
Pages: 274


Chapter 1 Testable JavaScript
Chapter 2 Complexity
Chapter 3 Event-Based Architectures
Chapter 4 Unit Tests
Chapter 5 Code Coverage
Chapter 6 Integration, Performance, and Load Testing
Chapter 7 Debugging
Chapter 8 Automation
First off, I want to say this is one of my favorite books. It is a great work on developing with TDD and agile with a focus on JavaScript. I am considering buying a print copy
to keep next to my computer with the GoF, Growing Object Oriented… and Release It! I am big believer in the main aim of the book to keep javascript code simple and
loosely coupled. This is not a book for those who don’t know JavaScript or have some background in Test Driven Development.

The book starts with a nice section on agile, TDD, BDD , the why’s, what’s and how’s of all the best practices for modern development. There is a very thorugh discussion of a
number of great development tools including: JSLInt, JSmeter, JSCheckStyle, YUIDoc and JSDoc. This book is great for Java developers wishing to start doing enterprise level
JavaScript on the client and server and in-between (Meteor / Derby).

I like this book also for it’s thorough coverage of best modern development practices: Code Reuse, Coupling, Metrics, Dependency Injection, auto documenation (think javadoc),
formalized softwtare inspections, coder coverage, fan-out/fan-in nd more agile practices.

One of the other strong topics in the book is Event-Based Architectures / programming. Event-based programming is great for decoupling objects. There is also great information on using and Event-Hub and as well.

Testing Topics from the Book

  • vows
  • isolation
  • scope
  • mock objects
  • positive and negative testing
  • PhantomJS for testing
  • stubs
  • spies
  • asynchronous testing
  • running tests on the client and server side

Cool Tools from the Book

Links from the Book



Written By bunkertor

Leave a Reply

Your email address will not be published. Required fields are marked *