Use the clock from jasmineUnderTest in specs

This commit is contained in:
Steve Gravrock
2021-12-31 10:00:14 -08:00
parent 883f400074
commit 8444faab72

View File

@@ -303,13 +303,13 @@ describe('DelayedFunctionScheduler', function() {
let lastWork = 0; let lastWork = 0;
beforeEach(() => { beforeEach(() => {
clock = jasmine.clock(); clock = jasmineUnderTest.getEnv().clock;
clock.install(); clock.install();
clock.mockDate(new Date(1)); clock.mockDate(new Date(1));
}); });
afterEach(function() { afterEach(function() {
jasmine.clock().uninstall(); jasmineUnderTest.getEnv().clock.uninstall();
}); });
it('preserves monotonically-increasing current time', () => { it('preserves monotonically-increasing current time', () => {