Upgrade to latest sinon and chai

This commit is contained in:
Pierre Ossman 2019-08-15 15:35:30 +02:00
parent b875486db8
commit c9765e5066
3 changed files with 13 additions and 13 deletions

View File

@ -51,7 +51,7 @@
"babel-preset-es2015": "^6.24.1", "babel-preset-es2015": "^6.24.1",
"babelify": "^7.3.0", "babelify": "^7.3.0",
"browserify": "^13.1.0", "browserify": "^13.1.0",
"chai": "^3.5.0", "chai": "*",
"commander": "^2.9.0", "commander": "^2.9.0",
"es-module-loader": "^2.1.0", "es-module-loader": "^2.1.0",
"eslint": "^4.16.0", "eslint": "^4.16.0",
@ -68,8 +68,8 @@
"requirejs": "^2.3.2", "requirejs": "^2.3.2",
"rollup": "^0.41.4", "rollup": "^0.41.4",
"rollup-plugin-node-resolve": "^2.0.0", "rollup-plugin-node-resolve": "^2.0.0",
"sinon": "^4.0.0", "sinon": "*",
"sinon-chai": "^2.8.0" "sinon-chai": "*"
}, },
"dependencies": {}, "dependencies": {},
"keywords": [ "keywords": [

View File

@ -437,7 +437,7 @@ describe('Key Event Handling', function () {
expect(kbd.onkeyevent.secondCall).to.have.been.calledWith(0x61, "KeyA", true); expect(kbd.onkeyevent.secondCall).to.have.been.calledWith(0x61, "KeyA", true);
// Check that the timer is properly dead // Check that the timer is properly dead
kbd.onkeyevent.reset(); kbd.onkeyevent.resetHistory();
this.clock.tick(100); this.clock.tick(100);
expect(kbd.onkeyevent).to.not.have.been.called; 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); expect(kbd.onkeyevent.thirdCall).to.have.been.calledWith(0x61, "KeyA", false);
// Check that the timer is properly dead // Check that the timer is properly dead
kbd.onkeyevent.reset(); kbd.onkeyevent.resetHistory();
this.clock.tick(100); this.clock.tick(100);
expect(kbd.onkeyevent).to.not.have.been.called; 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); expect(kbd.onkeyevent).to.have.been.calledWith(0xfe03, 'AltRight', true);
// Check that the timer is properly dead // Check that the timer is properly dead
kbd.onkeyevent.reset(); kbd.onkeyevent.resetHistory();
this.clock.tick(100); this.clock.tick(100);
expect(kbd.onkeyevent).to.not.have.been.called; 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); expect(kbd.onkeyevent.secondCall).to.have.been.calledWith(0xffea, "AltRight", true);
// Check that the timer is properly dead // Check that the timer is properly dead
kbd.onkeyevent.reset(); kbd.onkeyevent.resetHistory();
this.clock.tick(100); this.clock.tick(100);
expect(kbd.onkeyevent).to.not.have.been.called; expect(kbd.onkeyevent).to.not.have.been.called;
}); });

View File

@ -353,7 +353,7 @@ describe('Remote Frame Buffer Protocol Client', function () {
client.clipViewport = false; client.clipViewport = false;
expect(spy.set).to.have.been.calledOnce; expect(spy.set).to.have.been.calledOnce;
expect(spy.set).to.have.been.calledWith(false); expect(spy.set).to.have.been.calledWith(false);
spy.set.reset(); spy.set.resetHistory();
client.clipViewport = true; client.clipViewport = true;
expect(spy.set).to.have.been.calledOnce; expect(spy.set).to.have.been.calledOnce;
@ -438,7 +438,7 @@ describe('Remote Frame Buffer Protocol Client', function () {
client._handleMouseButton(13, 9, 0x000); client._handleMouseButton(13, 9, 0x000);
expect(RFB.messages.pointerEvent).to.have.been.calledTwice; expect(RFB.messages.pointerEvent).to.have.been.calledTwice;
RFB.messages.pointerEvent.reset(); RFB.messages.pointerEvent.resetHistory();
// Small movement // Small movement
client._handleMouseButton(13, 9, 0x001); 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.calledOnce;
expect(client._display.viewportChangePos).to.have.been.calledWith(-30, 0); 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 // 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.calledOnce;
expect(spy.set).to.have.been.calledWith(true); expect(spy.set).to.have.been.calledWith(true);
spy.set.reset(); spy.set.resetHistory();
client.scaleViewport = true; client.scaleViewport = true;
expect(spy.set).to.have.been.calledOnce; 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.calledOnce;
expect(RFB.messages.setDesktopSize).to.have.been.calledWith(sinon.match.object, 70, 80, 0, 0); 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 // Second message should not trigger a resize
@ -2056,7 +2056,7 @@ describe('Remote Frame Buffer Protocol Client', function () {
beforeEach(function () { beforeEach(function () {
client.showDotCursor = true; client.showDotCursor = true;
// Was called when we enabled dot cursor // Was called when we enabled dot cursor
client._cursor.change.reset(); client._cursor.change.resetHistory();
}); });
it('should show a standard cursor', function () { it('should show a standard cursor', function () {