mirror of
https://github.com/danbulant/node-x11
synced 2026-05-19 12:28:58 +00:00
34 lines
917 B
JavaScript
34 lines
917 B
JavaScript
var x11 = require('../lib');
|
|
var should = require('should');
|
|
|
|
describe('requiring an X11 extension on same connection', function() {
|
|
before(function(done) {
|
|
var self = this;
|
|
var client = x11.createClient(function(err, dpy) {
|
|
should.not.exist(err);
|
|
self.X = dpy.client;
|
|
done();
|
|
});
|
|
|
|
client.on('error', function (err) {
|
|
console.error('Error : ', err);
|
|
});
|
|
});
|
|
|
|
it('should be cached', function(done) {
|
|
var self = this;
|
|
this.X.require('xtest', function(err, randr) {
|
|
should.not.exist(err);
|
|
self.X.require('xtest', function(err, randr1) {
|
|
should.not.exist(err);
|
|
randr.should.equal(randr1);
|
|
done();
|
|
});
|
|
});
|
|
});
|
|
|
|
after(function(done) {
|
|
this.X.terminate();
|
|
this.X.on('end', done);
|
|
});
|
|
});
|