' + (a.error.stack || a.error) + '' :
'' + (a.error.stack || a.error) + '
');
li.className = 'fail';
}
else {
li.innerHTML = a.message || a.method || 'no message';
li.className = 'pass';
}
aList.appendChild(li);
}
test.appendChild(aList);
tests.appendChild(test);
},
done: function (assertions) {
var end = new Date().getTime();
var duration = end - start;
var failures = assertions.failures();
banner.className = failures ? 'fail': 'pass';
result.innerHTML = 'Tests completed in ' + duration +
' milliseconds.
' +
assertions.passes() + ' assertions of ' +
'' + assertions.length + ' passed, ' +
assertions.failures() + ' failed.';
if (callback) callback(assertions.failures() ? new Error('We have got test failures.') : undefined);
}
});
};
})(reporter);
nodeunit = core;
nodeunit.assert = assert;
nodeunit.reporter = reporter;
nodeunit.run = reporter.run;
return nodeunit; })();