From 6cd69705d6c9a16337d6f653c14168d2e194684f Mon Sep 17 00:00:00 2001 From: Samuel Mannehed Date: Fri, 10 Dec 2021 19:39:49 +0100 Subject: [PATCH] Make sure we wait for the resizeTimeout in tests Not waiting for the full timeout can obscure future bugs. --- tests/test.rfb.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/test.rfb.js b/tests/test.rfb.js index 1685f81d..1d806e72 100644 --- a/tests/test.rfb.js +++ b/tests/test.rfb.js @@ -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; });