Major refactoring of Spec. Moved QueuedFunction to Block, WaitsBlock and WaitsForBlock. Waits and WaitsFor blocks now sequentially stackable
This commit is contained in:
14
src/WaitsBlock.js
Normal file
14
src/WaitsBlock.js
Normal file
@@ -0,0 +1,14 @@
|
||||
jasmine.WaitsBlock = function(env, timeout, spec) {
|
||||
this.timeout = timeout;
|
||||
jasmine.Block.call(this, env, null, spec);
|
||||
};
|
||||
|
||||
jasmine.util.inherit(jasmine.WaitsBlock, jasmine.Block);
|
||||
|
||||
jasmine.WaitsBlock.prototype.execute = function () {
|
||||
var self = this;
|
||||
self.env.reporter.log('>> Jasmine waiting for ' + this.timeout + ' ms...');
|
||||
self.env.setTimeout(function () {
|
||||
self.next();
|
||||
}, self.timeout);
|
||||
};
|
||||
Reference in New Issue
Block a user