6. Writing Testable JavaScript
Rebecca Murphey talks at Full Frontal 2012
It’s one thing to write the code you need to write to get something working; it’s another thing to write the code you need to write if you want to be able to prove that it works — and that it keeps working as you refactor and add new features. In this talk, we’ll look at what it means to write testable JavaScript code, and even write and run a few tests using Grunt and the Mocha testing framework.
source