Introducing node-unittest

After being unable to find a reasonable xUnit-style for Node.js I decided to write my own implementation with async concepts based on Twisted's Trial testing framework.

Welcome to node-unittest :)

Existing frameworks don't work at all how we expect:

  • JSpec is based on RSpec and jumps down the same domain-specific-language rabbit hole that so many Ruby projects do, presenting you with a swath of object method overrides and pre-processors so that you get to learn a new language to use it.
  • nodeunit is based on QUnit which is the jQuery testing framework that provides a very functional (as opposed to object-oriented) approach to testing that throws away all the patterns and knowledge we've already built up writing xUnit tests in every other programming language.
  • assert, the built in library does very nicely for what it does but it provides no framework for organization or running tests.

So, node-unittest, it's very early right now but as I have at least two projects depending on it for tests it should mature quickly. It does what you'd expect, allows you to return Deferreds from tests to deal with async tests, examples and more are on the project page.