Make sure we wait for the resizeTimeout in tests

Not waiting for the full timeout can obscure future bugs.
This commit is contained in:
Samuel Mannehed 2021-12-10 19:39:49 +01:00
parent acc30093ad
commit 6cd69705d6
1 changed files with 5 additions and 5 deletions

View File

@ -523,7 +523,7 @@ describe('Remote Frame Buffer Protocol Client', function () {
container.style.width = '40px';
container.style.height = '50px';
fakeResizeObserver.fire();
clock.tick();
clock.tick(1000);
expect(client._display.viewportChangeSize).to.have.been.calledOnce;
expect(client._display.viewportChangeSize).to.have.been.calledWith(40, 50);
@ -554,7 +554,7 @@ describe('Remote Frame Buffer Protocol Client', function () {
container.style.width = '40px';
container.style.height = '50px';
fakeResizeObserver.fire();
clock.tick();
clock.tick(1000);
expect(client._display.viewportChangeSize).to.not.have.been.called;
});
@ -566,7 +566,7 @@ describe('Remote Frame Buffer Protocol Client', function () {
container.style.width = '40px';
container.style.height = '50px';
fakeResizeObserver.fire();
clock.tick();
clock.tick(1000);
expect(client._display.viewportChangeSize).to.not.have.been.called;
});
@ -717,7 +717,7 @@ describe('Remote Frame Buffer Protocol Client', function () {
container.style.width = '40px';
container.style.height = '50px';
fakeResizeObserver.fire();
clock.tick();
clock.tick(1000);
expect(client._display.autoscale).to.have.been.calledOnce;
expect(client._display.autoscale).to.have.been.calledWith(40, 50);
@ -747,7 +747,7 @@ describe('Remote Frame Buffer Protocol Client', function () {
container.style.width = '40px';
container.style.height = '50px';
fakeResizeObserver.fire();
clock.tick();
clock.tick(1000);
expect(client._display.autoscale).to.not.have.been.called;
});