nodeunitq
v0.0.1nodeunitq
Simple utilities for nodeunit (like test builders and assertions), particularly around Q promises.
In normal nodeunit, you add a test like this:
exports.testFunction = function (test) {
promise.run()
.fail(failureHandler)
.fin(test.done.bind(test))
}
In nodeunitq, you write a test like this:
var Q = require('Q')
var nodeunitq = require('nodeunitq')
var builder = new nodeunitq.Builder(exports)
builder.add(function testPromise(test) {
return Q.fcall(function () { return 1 })
})
And nodeunitq will take care of the failure handling for you.
License
npm i [email protected]
Homepage
github.com/Obvious/nodeunitqMetadata
- Unknown
- Whatever
- Unknown
- released 6/11/2013