fix Travis build false passes when running tests

This commit is contained in:
Vladimir Agafonkin 2014-01-03 00:37:07 +02:00
parent c4a9418d3b
commit 0cf887fdb4

View File

@ -143,7 +143,7 @@ exports.build = function (callback, version, compsBase32, buildName) {
});
};
exports.test = function(callback) {
exports.test = function(complete, fail) {
var karma = require('karma'),
testConfig = {configFile : __dirname + '/../spec/karma.conf.js'};
@ -182,7 +182,9 @@ exports.test = function(callback) {
karma.server.start(testConfig, function(exitCode) {
if (!exitCode) {
console.log('\tTests ran successfully.\n');
complete();
} else {
process.exit(exitCode);
}
callback();
});
};