Merge branch 'master' of https://github.com/pivotal/jasmine
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -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();
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -477,7 +477,7 @@ getJasmineRequireObj().Env = function(j$) {
|
|||||||
return j$.Spec.isPendingSpecException(e) || catchExceptions;
|
return j$.Spec.isPendingSpecException(e) || catchExceptions;
|
||||||
};
|
};
|
||||||
|
|
||||||
var maximumSpecCallbackDepth = 100;
|
var maximumSpecCallbackDepth = 75;
|
||||||
var currentSpecCallbackDepth = 0;
|
var currentSpecCallbackDepth = 0;
|
||||||
|
|
||||||
function clearStack(fn) {
|
function clearStack(fn) {
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ describe("ExceptionFormatter", function() {
|
|||||||
|
|
||||||
describe("#stack", function() {
|
describe("#stack", function() {
|
||||||
it("formats stack traces from Webkit, Firefox, node.js or IE10+", function() {
|
it("formats stack traces from Webkit, Firefox, node.js or IE10+", function() {
|
||||||
if (jasmine.getEnv().ieVersion < 10) { return; }
|
if (jasmine.getEnv().ieVersion < 10 || jasmine.getEnv().safariVersion < 6) { return; }
|
||||||
|
|
||||||
var error;
|
var error;
|
||||||
try { throw new Error("an error") } catch(e) { error = e; }
|
try { throw new Error("an error") } catch(e) { error = e; }
|
||||||
|
|||||||
@@ -7,4 +7,13 @@
|
|||||||
|
|
||||||
return match ? parseFloat(match[1]) : Number.MAX_VALUE;
|
return match ? parseFloat(match[1]) : Number.MAX_VALUE;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
env.safariVersion = (function() {
|
||||||
|
var userAgent = jasmine.getGlobal().navigator.userAgent;
|
||||||
|
if (!userAgent) { return Number.MAX_VALUE; }
|
||||||
|
|
||||||
|
var match = /Safari/.exec(userAgent) && /Version\/([0-9]{0,})/.exec(userAgent);
|
||||||
|
|
||||||
|
return match ? parseFloat(match[1]) : Number.MAX_VALUE;
|
||||||
|
})();
|
||||||
})(jasmine.getEnv());
|
})(jasmine.getEnv());
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ getJasmineRequireObj().ConsoleReporter = function() {
|
|||||||
|
|
||||||
printNewline();
|
printNewline();
|
||||||
|
|
||||||
onComplete();
|
onComplete(failureCount === 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
this.specDone = function(result) {
|
this.specDone = function(result) {
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ getJasmineRequireObj().ConsoleReporter = function() {
|
|||||||
|
|
||||||
printNewline();
|
printNewline();
|
||||||
|
|
||||||
onComplete();
|
onComplete(failureCount === 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
this.specDone = function(result) {
|
this.specDone = function(result) {
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ getJasmineRequireObj().Env = function(j$) {
|
|||||||
return j$.Spec.isPendingSpecException(e) || catchExceptions;
|
return j$.Spec.isPendingSpecException(e) || catchExceptions;
|
||||||
};
|
};
|
||||||
|
|
||||||
var maximumSpecCallbackDepth = 100;
|
var maximumSpecCallbackDepth = 75;
|
||||||
var currentSpecCallbackDepth = 0;
|
var currentSpecCallbackDepth = 0;
|
||||||
|
|
||||||
function clearStack(fn) {
|
function clearStack(fn) {
|
||||||
|
|||||||
@@ -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();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user