From c9765e5066b933162bccf77936e64eb1ee75733b Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Thu, 15 Aug 2019 15:35:30 +0200 Subject: [PATCH] Upgrade to latest sinon and chai --- package.json | 6 +++--- tests/test.keyboard.js | 8 ++++---- tests/test.rfb.js | 12 ++++++------ 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 2d84a5f3..1e6bc72f 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "babel-preset-es2015": "^6.24.1", "babelify": "^7.3.0", "browserify": "^13.1.0", - "chai": "^3.5.0", + "chai": "*", "commander": "^2.9.0", "es-module-loader": "^2.1.0", "eslint": "^4.16.0", @@ -68,8 +68,8 @@ "requirejs": "^2.3.2", "rollup": "^0.41.4", "rollup-plugin-node-resolve": "^2.0.0", - "sinon": "^4.0.0", - "sinon-chai": "^2.8.0" + "sinon": "*", + "sinon-chai": "*" }, "dependencies": {}, "keywords": [ diff --git a/tests/test.keyboard.js b/tests/test.keyboard.js index 77fe3f6f..331a85b5 100644 --- a/tests/test.keyboard.js +++ b/tests/test.keyboard.js @@ -437,7 +437,7 @@ describe('Key Event Handling', function () { expect(kbd.onkeyevent.secondCall).to.have.been.calledWith(0x61, "KeyA", true); // Check that the timer is properly dead - kbd.onkeyevent.reset(); + kbd.onkeyevent.resetHistory(); this.clock.tick(100); expect(kbd.onkeyevent).to.not.have.been.called; }); @@ -455,7 +455,7 @@ describe('Key Event Handling', function () { expect(kbd.onkeyevent.thirdCall).to.have.been.calledWith(0x61, "KeyA", false); // Check that the timer is properly dead - kbd.onkeyevent.reset(); + kbd.onkeyevent.resetHistory(); this.clock.tick(100); expect(kbd.onkeyevent).to.not.have.been.called; }); @@ -470,7 +470,7 @@ describe('Key Event Handling', function () { expect(kbd.onkeyevent).to.have.been.calledWith(0xfe03, 'AltRight', true); // Check that the timer is properly dead - kbd.onkeyevent.reset(); + kbd.onkeyevent.resetHistory(); this.clock.tick(100); expect(kbd.onkeyevent).to.not.have.been.called; }); @@ -486,7 +486,7 @@ describe('Key Event Handling', function () { expect(kbd.onkeyevent.secondCall).to.have.been.calledWith(0xffea, "AltRight", true); // Check that the timer is properly dead - kbd.onkeyevent.reset(); + kbd.onkeyevent.resetHistory(); this.clock.tick(100); expect(kbd.onkeyevent).to.not.have.been.called; }); diff --git a/tests/test.rfb.js b/tests/test.rfb.js index 7e1c52e4..1563a1e2 100644 --- a/tests/test.rfb.js +++ b/tests/test.rfb.js @@ -353,7 +353,7 @@ describe('Remote Frame Buffer Protocol Client', function () { client.clipViewport = false; expect(spy.set).to.have.been.calledOnce; expect(spy.set).to.have.been.calledWith(false); - spy.set.reset(); + spy.set.resetHistory(); client.clipViewport = true; expect(spy.set).to.have.been.calledOnce; @@ -438,7 +438,7 @@ describe('Remote Frame Buffer Protocol Client', function () { client._handleMouseButton(13, 9, 0x000); expect(RFB.messages.pointerEvent).to.have.been.calledTwice; - RFB.messages.pointerEvent.reset(); + RFB.messages.pointerEvent.resetHistory(); // Small movement client._handleMouseButton(13, 9, 0x001); @@ -472,7 +472,7 @@ describe('Remote Frame Buffer Protocol Client', function () { expect(client._display.viewportChangePos).to.have.been.calledOnce; expect(client._display.viewportChangePos).to.have.been.calledWith(-30, 0); - client._display.viewportChangePos.reset(); + client._display.viewportChangePos.resetHistory(); // Now a small movement should move right away @@ -543,7 +543,7 @@ describe('Remote Frame Buffer Protocol Client', function () { expect(spy.set).to.have.been.calledOnce; expect(spy.set).to.have.been.calledWith(true); - spy.set.reset(); + spy.set.resetHistory(); client.scaleViewport = true; expect(spy.set).to.have.been.calledOnce; @@ -633,7 +633,7 @@ describe('Remote Frame Buffer Protocol Client', function () { expect(RFB.messages.setDesktopSize).to.have.been.calledOnce; expect(RFB.messages.setDesktopSize).to.have.been.calledWith(sinon.match.object, 70, 80, 0, 0); - RFB.messages.setDesktopSize.reset(); + RFB.messages.setDesktopSize.resetHistory(); // Second message should not trigger a resize @@ -2056,7 +2056,7 @@ describe('Remote Frame Buffer Protocol Client', function () { beforeEach(function () { client.showDotCursor = true; // Was called when we enabled dot cursor - client._cursor.change.reset(); + client._cursor.change.resetHistory(); }); it('should show a standard cursor', function () {