Allow waitsFor() arguments to be specified in arbitrary order.

Default waitsFor() timeout is now specified in env.defaultTimeoutInterval; defaults to 5 seconds.
Deprecate waits() block in favor of waitsFor().
This commit is contained in:
Christian Williams
2010-08-25 18:04:52 -07:00
parent 55149310c3
commit e7a57606a2
5 changed files with 108 additions and 11 deletions

View File

@@ -10,7 +10,7 @@
* @param {jasmine.Spec} spec The Jasmine spec.
*/
jasmine.WaitsForBlock = function(env, timeout, latchFunction, message, spec) {
this.timeout = timeout;
this.timeout = timeout || env.defaultTimeoutInterval;
this.latchFunction = latchFunction;
this.message = message;
this.totalTimeSpentWaitingForLatch = 0;