Rename for stack-clearing post spec run to be more clear; use the real setTimeout when clearing stack

This commit is contained in:
Davis W. Frank and Sheel Choksi
2013-07-02 09:51:41 -07:00
parent 2916a8a1ff
commit f5bc9faf63
5 changed files with 17 additions and 15 deletions

View File

@@ -118,15 +118,15 @@ describe("QueueRunner", function() {
it("calls a provided garbage collection function with the complete callback when done", function() {
var fn = jasmine.createSpy('fn'),
completeCallback = jasmine.createSpy('completeCallback'),
encourageGC = jasmine.createSpy('encourageGC'),
clearStack = jasmine.createSpy('clearStack'),
queueRunner = new j$.QueueRunner({
fns: [fn],
encourageGC: encourageGC,
clearStack: clearStack,
onComplete: completeCallback
});
queueRunner.execute();
expect(encourageGC).toHaveBeenCalledWith(completeCallback);
expect(clearStack).toHaveBeenCalledWith(completeCallback);
});
});