This commit is contained in:
Davis W. Frank
2013-04-20 08:27:38 -07:00
parent 9c4467bac0
commit dd8d3f9788
3 changed files with 28 additions and 8 deletions

View File

@@ -291,4 +291,24 @@ describe("Clock (acceptance)", function() {
clock.tick(5);
expect(delayedFn1).toHaveBeenCalled();
});
it("calls the global clearTimeout correctly when not installed", function () {
var delayedFunctionScheduler = jasmine.createSpyObj('delayedFunctionScheduler', ['clearTimeout']),
global = originalJasmine.getGlobal(),
clock = new jasmine.Clock(global, delayedFunctionScheduler);
expect(function() {
clock.clearTimeout(123)
}).not.toThrow();
});
it("calls the global clearTimeout correctly when not installed", function () {
var delayedFunctionScheduler = jasmine.createSpyObj('delayedFunctionScheduler', ['clearTimeout']),
global = originalJasmine.getGlobal(),
clock = new jasmine.Clock(global, delayedFunctionScheduler);
expect(function() {
clock.clearInterval(123)
}).not.toThrow();
});
});