Test driven development
Since my talk at Front-Trends in Poland last week I've gotten a few requests for examples of using Sinon.JS with QUnit. Sinon.JS is completely test framework agnostic and should be very easy to use with any testing framework. This post introduces a mini-plugin, sinon-qunit and shows a few examples of using Sinon.JS with QUnit.
Last week I gave a talk at FrontTrends 2010. Here's the code from my talk, and a brief summary of it.
I hacked a little on JsTestDriver today, fixing a few bugs in some assertions, and possibly more interestingly - improved assertion error messages for certain types of objects.
Sinon.JS 0.6.0 is out and it features a new
FakeXMLHttpRequest object and a high-level interface for testing xhr-dependent code along with improvements to
Sometimes it's useful to split largish JsTestDriver test suites into smaller chunks for debugging, or for slower runs. Here's a quickie little script I wrote to do just that.
While presenting the core Sinon interface yesterday i unintentionally left out parts of the API. To make up for the mistake, here are the missing pieces.
Recently I've been dabbling in the fantastic library that is node.js. Whenever I enter a new development environment I immediately poke around to figure out how to unit test things. I'm uncomfortable writing too much code without tests, especially when I'm on unfamiliar grounds. Here's what I landed on in round one.
Today I needed remote access to a gem I've been tinkering with for a while, so I pushed it to
Gemcutter. It's called
jstdutil, and it provides a small Ruby wrapper over
JsTestDriver that adds colored output, a short, snappy
`jstestdriver` command and autotest.
After switching my Ruby tests from vanilla
Jeremy McAnally's Context) a while back I've gotten quite used to sexy unit tests. Coming back to
Over the past few days I've been adding some bits and pieces that has really pimped by development environment into a slightly more productive one, and certainly a more enjoyable one.
trim() function. The end result is presented with Qunit, jsunittest.js and YUI Test.