Re-add Mock Clock behavior as global 'clock'

- Use clock.install, clock.tick...
- Add unit coverage.
- Fixes old bug in function scheduler
This commit is contained in:
Davis W. Frank & Rajan Agaskar
2012-12-06 18:22:46 -08:00
parent a1011e7748
commit 74f928fd54
19 changed files with 1074 additions and 464 deletions

View File

@@ -71,12 +71,6 @@ describe("HtmlReporter", function() {
var runner, spec, fakeTimer;
beforeEach(function() {
fakeTimer = new jasmine.FakeTimer();
env.setTimeout = fakeTimer.setTimeout;
env.clearTimeout = fakeTimer.clearTimeout;
env.setInterval = fakeTimer.setInterval;
env.clearInterval = fakeTimer.clearInterval;
fakeDocument.location.search = "?";
env.addReporter(htmlReporter);
});
@@ -89,7 +83,6 @@ describe("HtmlReporter", function() {
});
env.execute();
fakeTimer.tick(0);
var resultEl = getResultMessageDiv(body);
expect(resultEl.innerHTML).toMatch(/foo/);