May 26, 2010

TDD w/javascript using jsTestDriver and (f.ex) QUnit

JsTestDriver is seemingly yet another unit testing framework, and it stems from Google. I say seemingly, because the JsTestDriver guys has made some delicious improvements over the normal work flow which sets it apart from other unit testing frameworks for JavaScript so much it's not even funny to compare.

Having said that, JsTestDriver is (as the name implies) really more of a test runner. It ships a default assertion framework, however it doesn't offer all kinds of JavaScript specific assertions. Instead, JsTestDriver makes it fairly accomplish-able to use your current assertion framework of choice with JsTestDriver by providing a bridge. Last time I checked, both QUnit and YUI Test had functional bridges.
Test driven JavaScript done right / JavaScript - cjohansen.no

There's also an eclipse plugin.

 ff
Blogged with the Flock Browser