From 4882d540be5d51255f9e14ed4b63111d9858c05a Mon Sep 17 00:00:00 2001 From: David Rice Date: Wed, 8 Aug 2012 23:28:07 +0100 Subject: [PATCH] running npm test should exit with a failure status if test failures > 0, should fix travisci reporting --- test.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test.js b/test.js index a993b847..26a752e7 100644 --- a/test.js +++ b/test.js @@ -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); }