Entry point for writing tests with it.
Creates a test with it.
Argumentsthe description of the test.
the function to invoke in the scope of the test. The it suite is passed as the first argument.
it.Suite the test.
function (description,cb){
var it = describeIt(description);
"function" === typeof cb && cb(it);
return it;
}
Run all tests that are currently registered.
Returnscomb.Promise a promise that is resolved once all tests are done running.
function (){
var ret = comb.serial(Object.keys(its).map(function (k) {
return function () {
return its[k].run();
};
}));
comb.listenForExit(function () {
ret.then(function (results) {
var its = {};
results.forEach(function (summary) {
comb.merge(its, summary);
});
printSummary(its);
});
});
return ret;
}
MIT https://github.com/doug-martin/it/raw/master/LICENSE
Code: git clone git://github.com/doug-martin/it.git