mirror of
https://github.com/danbulant/node-x11
synced 2026-05-19 04:18:35 +00:00
fix tests
This commit is contained in:
parent
56001da581
commit
75ad329b4f
2 changed files with 8 additions and 2 deletions
|
|
@ -52,9 +52,16 @@ describe('Client', function() {
|
|||
});
|
||||
|
||||
it('returns error when connecting to non existent display', function(done) {
|
||||
var errorCbCalled = false;
|
||||
var client = x11.createClient({ display : ':44' }, function(err, display) {
|
||||
assert(util.isError(err));
|
||||
errorCbCalled = true;
|
||||
done();
|
||||
});
|
||||
// TODO: stop writing to socket after first error
|
||||
client.on('error', function() {
|
||||
if (!errorCbCalled)
|
||||
done('should not reach here before first done()');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ describe('Client', function() {
|
|||
|
||||
var display;
|
||||
beforeEach(function(done) {
|
||||
var client = x11.createClient(function(err, dpy) {
|
||||
var client = x11.createClient({ debug: true }, function(err, dpy) {
|
||||
console.log(err)
|
||||
display = dpy;
|
||||
done(err);
|
||||
|
|
@ -14,7 +14,6 @@ describe('Client', function() {
|
|||
});
|
||||
|
||||
it('should emit error which is instance of Error with sequence number corresponding to source request', function(done) {
|
||||
display.client.options.debug = true;
|
||||
display.client.CreateWindow(); // should emit error
|
||||
var seq = display.client.seq_num;
|
||||
display.client.once('error', function(err) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue