diff --git a/package.json b/package.json index 174eee5..4d6fa52 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ , "description": "A pure node.js JavaScript client implementing X Window (X11) protocol." , "keywords": ["X Window", "ui", "gui", "widgets", "desktop", "XWindow", "X"] , "homepage": "https://github.com/sidorares/node-x11" -, "version" : "0.0.6" +, "version" : "0.0.7" , "maintainers" : [ { "name": "Andrey Sidorov" , "email": "sidoares@yandex.ru" @@ -21,7 +21,6 @@ , "devDependencies": { "mocha": "*", "should": "*", - "sinon": "*" } , "scripts": { "test": "mocha", diff --git a/test/connect.js b/test/connect.js index 6c7a2b4..a154b76 100644 --- a/test/connect.js +++ b/test/connect.js @@ -1,5 +1,4 @@ var x11 = require('../lib/x11'); -//var sinon = require('sinon'); var should = require('should'); var assert = require('assert'); @@ -10,8 +9,9 @@ describe('Client', function() { var client = x11.createClient(function(dpy) { display=dpy; done(); + client.removeListener('error', done); }); - client.on('error', function(err) { done(err); }); + client.on('error', done); }); it('calls first createClient parameter with display object', function(done) { @@ -29,6 +29,7 @@ describe('Client', function() { var client = x11.createClient(function(display) { done(); }, disp); + client.on('error', done); process.env.DISPLAY=disp; }); @@ -42,7 +43,6 @@ describe('Client', function() { }, /Cannot parse display/); done(); } catch(e) { - console.log(e); done(); } });