running npm test should exit with a failure status if test failures > 0, should fix travisci reporting

This commit is contained in:
David Rice 2012-08-08 23:28:07 +01:00
parent 9e5c2d3a9e
commit 4882d540be

View file

@ -1,6 +1,6 @@
var testrunner = require('qunit');
testrunner.options.log.summary = false;
testrunner.options.log.summary = true;
testrunner.options.log.tests = false;
testrunner.options.log.assertions = false;
@ -27,6 +27,11 @@ testrunner.run({
'./site/test/unit/canvas_static.js'
]
}, function(err, report) {
if(report.failed > 0){
process.on('exit', function() {
process.exit(1);
});
}
if (err) {
console.log(err);
}