Major refactoring of Spec. Moved QueuedFunction to Block, WaitsBlock and WaitsForBlock. Waits and WaitsFor blocks now sequentially stackable

This commit is contained in:
ragaskar
2009-07-29 22:27:11 -07:00
parent 708d148d31
commit a1a278ee69
10 changed files with 912 additions and 754 deletions

14
src/WaitsBlock.js Normal file
View 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);
};