2009-07-30 05:27:11 +00:00
|
|
|
jasmine.WaitsBlock = function(env, timeout, spec) {
|
|
|
|
this.timeout = timeout;
|
|
|
|
jasmine.Block.call(this, env, null, spec);
|
|
|
|
};
|
|
|
|
|
|
|
|
jasmine.util.inherit(jasmine.WaitsBlock, jasmine.Block);
|
|
|
|
|
2009-08-04 05:22:13 +00:00
|
|
|
jasmine.WaitsBlock.prototype.execute = function (onComplete) {
|
|
|
|
this.env.reporter.log('>> Jasmine waiting for ' + this.timeout + ' ms...');
|
|
|
|
this.env.setTimeout(function () {
|
|
|
|
onComplete();
|
|
|
|
}, this.timeout);
|
2009-07-30 05:27:11 +00:00
|
|
|
};
|