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.

Original source


20 responses to “6. Writing Testable JavaScript”

  1. I think that even if you don't write test code, you're still doing TDD, it's just in your mind. You have an idea of what the result should be, and you build to that idea. Then you (hopefully) write tests after the fact. Doing TDD and actually writing the tests just formalizes a process you do in your mind, and saves you from having to then write tests to pass with the code you've written, rather than writing code that passes your tests.

Leave a Reply