Use jasmine.DEFAULT_TIMEOUT_INTERVAL for async timeout

Allows a user to specify their desired timeout interval for async specs
and change it on a per spec basis (for particularly slow specs, for example).

As pointed out by @Eric-Wright in #422. [finishes #55996798]
This commit is contained in:
Sheel Choksi
2013-09-08 14:27:14 -07:00
parent 03dfea967c
commit 8ac085c103
3 changed files with 10 additions and 5 deletions

View File

@@ -58,7 +58,7 @@ getJasmineRequireObj().Spec = function() {
var timeout = Function.prototype.apply.apply(self.timer.setTimeout, [j$.getGlobal(), [function() {
onException(new Error('timeout'));
done();
}, 10000]]);
}, j$.DEFAULT_TIMEOUT_INTERVAL]]);
var callDone = function() {
Function.prototype.apply.apply(self.timer.clearTimeout, [j$.getGlobal(), [timeout]]);