fixed karma spec

This commit is contained in:
Phil Hughes 2018-08-10 16:50:49 +01:00
parent 730e354117
commit f3d37980ce
No known key found for this signature in database
GPG Key ID: 32245528C52E0F9F
1 changed files with 4 additions and 2 deletions

View File

@ -292,6 +292,8 @@ describe('IDE clientside preview', () => {
describe('update', () => { describe('update', () => {
beforeEach(() => { beforeEach(() => {
jasmine.clock().install(); jasmine.clock().install();
vm.sandpackReady = true;
vm.manager.updatePreview = jasmine.createSpy('updatePreview'); vm.manager.updatePreview = jasmine.createSpy('updatePreview');
vm.manager.listener = jasmine.createSpy('updatePreview'); vm.manager.listener = jasmine.createSpy('updatePreview');
}); });
@ -306,7 +308,7 @@ describe('IDE clientside preview', () => {
vm.update(); vm.update();
jasmine.clock().tick(500); jasmine.clock().tick(250);
expect(vm.initPreview).toHaveBeenCalled(); expect(vm.initPreview).toHaveBeenCalled();
}); });
@ -314,7 +316,7 @@ describe('IDE clientside preview', () => {
it('calls updatePreview', () => { it('calls updatePreview', () => {
vm.update(); vm.update();
jasmine.clock().tick(500); jasmine.clock().tick(250);
expect(vm.manager.updatePreview).toHaveBeenCalledWith(vm.sandboxOpts); expect(vm.manager.updatePreview).toHaveBeenCalledWith(vm.sandboxOpts);
}); });