node-qunit not working with nodeJS


I have installed node-qunit using npm and this appeared to work correctly.

The following script simply does nothing…no errors, no qunit output (not even failed test cases):

var testrunner = require('qunit');{
code: '/Users/macuser/Documents/test-input.js',
tests: '/Users/macuser/Documents/test-cases.js'
}, function(report) {

Problem courtesy of: Lea Hayes


Check what version of qunit you are using. I believe 0.2+ is unstable as it relies on Node 0.5+ (which is also unstable :

See issue 31

Try installing the stable branch

npm install qunit@stable

Solution courtesy of: timrwood

View additional discussion.