diff options
author | Samuel Mannehed <samuel@cendio.se> | 2021-12-10 19:39:49 +0100 |
---|---|---|
committer | Samuel Mannehed <samuel@cendio.se> | 2021-12-13 11:20:14 +0100 |
commit | 6cd69705d6c9a16337d6f653c14168d2e194684f (patch) | |
tree | 573cc8a9881231c41b3d78c83f6173b33a381939 | |
parent | acc30093ada1f69fdf9e98b1615c8139e6a3e42a (diff) | |
download | novnc-6cd69705d6c9a16337d6f653c14168d2e194684f.tar.gz |
Make sure we wait for the resizeTimeout in tests
Not waiting for the full timeout can obscure future bugs.
-rw-r--r-- | tests/test.rfb.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test.rfb.js b/tests/test.rfb.js index 1685f81..1d806e7 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; }); |