Test driven development is now widely accepted as a JavaScript workflow, and it’s something we should all embrace because it saves us a great deal of time when coding.
In this article I’ll introduce you to QUnit, a testing framework that will help you spot errors and bugs in your code.
At first, this process may seem complex and tedious. Creating a test for all of your functions does take some time, but it will save you hours of debugging at the end of the project cycle.
Not only that, but you’ll save yourself the blushes we all get when a client emails us about a bug they’ve found.
As a further benefit, you’ll find that this workflow also benefits cross-browser testing, and using this approach you can test in several browsers straight out of the box.
Your new post is loading...