From fd09ef984810fd653228cc26cd2f37af7ca9261a Mon Sep 17 00:00:00 2001 From: Antti Korpi Date: Tue, 23 Jan 2018 21:56:39 +0100 Subject: [PATCH 1/3] Nail devDependencies to specific version This documents what versions it's supposed to work with, and reduces potential future confusion if contributors accidentally work with different tool versions. --- package.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index ab47b61..203181a 100644 --- a/package.json +++ b/package.json @@ -40,11 +40,11 @@ "node": "*" }, "devDependencies": { - "mocha": "*", - "should": "*", - "sax": "*", - "async": "*", - "sinon": "*" + "async": "^2.6.0", + "mocha": "^5.0.0", + "sax": "^1.2.4", + "should": "^13.2.1", + "sinon": "^4.2.1" }, "scripts": { "test": "node test-runner.js", From e87b183a8f7e3f72e44539c240fe618b3b929756 Mon Sep 17 00:00:00 2001 From: Antti Korpi Date: Tue, 23 Jan 2018 22:06:42 +0100 Subject: [PATCH 2/3] Use sinon.resetHistory; sinon.reset is deprecated --- test/atoms-cache.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/atoms-cache.js b/test/atoms-cache.js index 76c315e..aef76a5 100644 --- a/test/atoms-cache.js +++ b/test/atoms-cache.js @@ -94,7 +94,7 @@ describe('Atoms and atom names cache', function() { function(err) { should.not.exist(err); should.exist(my_name); - self.spy.reset(); + self.spy.resetHistory(); self.X.InternAtom(true, my_name, function(err, atom) { should.not.exist(err); my_atom.should.equal(atom); From ed27aa84ff9bf8080d7ba0c68cf7608f5129174f Mon Sep 17 00:00:00 2001 From: Antti Korpi Date: Tue, 23 Jan 2018 22:29:34 +0100 Subject: [PATCH 3/3] Fix 'root' deprecation warning This would previously be printed in part of the test log: (node:1628) [DEP0016] DeprecationWarning: 'root' is deprecated, use 'global' Apparently, the global object was once called root, and this assignment didn't have a `var`, so it was actually setting the global object. I do wonder why that didn't break anything, but this is clearly what was intended. --- test/core-KillKlient.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/core-KillKlient.js b/test/core-KillKlient.js index 58387d5..d8125c0 100644 --- a/test/core-KillKlient.js +++ b/test/core-KillKlient.js @@ -11,7 +11,7 @@ describe('KillKlient request', function() { should.not.exist(err); display = dpy; X = display.client; - root = display.screen[0].root; + var root = display.screen[0].root; var eventMask = x11.eventMask.SubstructureNotify; X.ChangeWindowAttributes(root, { eventMask: eventMask }); done();