Src & Spec dirs now have same structure; console/, core/, and html/

This commit is contained in:
Davis W. Frank
2011-06-08 18:30:35 -07:00
parent 4c6dafa3f5
commit 86b095e5a4
26 changed files with 77 additions and 37 deletions

23
spec/core/QueueSpec.js Normal file
View File

@@ -0,0 +1,23 @@
describe("jasmine.Queue", function() {
it("should not call itself recursively, so we don't get stack overflow errors", function() {
var queue = new jasmine.Queue(new jasmine.Env());
queue.add(new jasmine.Block(null, function() {}));
queue.add(new jasmine.Block(null, function() {}));
queue.add(new jasmine.Block(null, function() {}));
queue.add(new jasmine.Block(null, function() {}));
var nestCount = 0;
var maxNestCount = 0;
var nextCallCount = 0;
queue.next_ = function() {
nestCount++;
if (nestCount > maxNestCount) maxNestCount = nestCount;
jasmine.Queue.prototype.next_.apply(queue, arguments);
nestCount--;
};
queue.start();
expect(maxNestCount).toEqual(1);
});
});