Resolve node issues

This commit is contained in:
JR Boyens
2013-07-26 16:44:48 -07:00
parent 8d295a2612
commit 0420e295f4
5 changed files with 9 additions and 8 deletions

View File

@@ -3,8 +3,9 @@ var grunt = require('grunt');
module.exports = { module.exports = {
execSpecsInNode: function() { execSpecsInNode: function() {
if (shell.exec("node spec/node_suite.js --color=true").code !== 0) { var exit_code = shell.exec("node spec/node_suite.js --color=true").code;
grunt.fail.fatal("Specs Failed"); if (exit_code !== 0) {
grunt.fail.fatal("Specs Failed", exit_code);
} }
} }
}; };

View File

@@ -278,13 +278,13 @@ getJasmineRequireObj().Spec = function() {
function timeoutable(fn) { function timeoutable(fn) {
return function(done) { return function(done) {
var timeout = Function.prototype.apply.apply(self.timer.setTimeout, [window, [function() { var timeout = Function.prototype.apply.apply(self.timer.setTimeout, [j$.getGlobal(), [function() {
onException(new Error('timeout')); onException(new Error('timeout'));
done(); done();
}, 10000]]); }, 10000]]);
var callDone = function() { var callDone = function() {
Function.prototype.apply.apply(self.timer.clearTimeout, [window, [timeout]]); Function.prototype.apply.apply(self.timer.clearTimeout, [j$.getGlobal(), [timeout]]);
done(); done();
}; };

View File

@@ -52,7 +52,7 @@ getJasmineRequireObj().ConsoleReporter = function() {
printNewline(); printNewline();
onComplete(); onComplete(failureCount === 0);
}; };
this.specDone = function(result) { this.specDone = function(result) {

View File

@@ -87,7 +87,7 @@ getJasmineRequireObj().ConsoleReporter = function() {
printNewline(); printNewline();
onComplete(); onComplete(failureCount === 0);
}; };
this.specDone = function(result) { this.specDone = function(result) {

View File

@@ -55,13 +55,13 @@ getJasmineRequireObj().Spec = function() {
function timeoutable(fn) { function timeoutable(fn) {
return function(done) { return function(done) {
var timeout = Function.prototype.apply.apply(self.timer.setTimeout, [window, [function() { var timeout = Function.prototype.apply.apply(self.timer.setTimeout, [j$.getGlobal(), [function() {
onException(new Error('timeout')); onException(new Error('timeout'));
done(); done();
}, 10000]]); }, 10000]]);
var callDone = function() { var callDone = function() {
Function.prototype.apply.apply(self.timer.clearTimeout, [window, [timeout]]); Function.prototype.apply.apply(self.timer.clearTimeout, [j$.getGlobal(), [timeout]]);
done(); done();
}; };