test
各テストに渡されるNodeUnit オブジェクトにカスタム アサーションを追加する方法はありますか?
私は次のようなことをしたいと思います:
var Test = require('nodeunit').Test;
Test.prototype.customAssertion = function(obj) {
test.same(obj.foo, 'bar');
test.same(obj.bar, 'baz');
}
exports.test = function(test) {
test.customAssertion(obj);
test.done();
}