From ed27aa84ff9bf8080d7ba0c68cf7608f5129174f Mon Sep 17 00:00:00 2001 From: Antti Korpi Date: Tue, 23 Jan 2018 22:29:34 +0100 Subject: [PATCH] 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();