parent
64b6b95935
commit
4ba32f922e
@ -1,2 +1,2 @@
|
|||||||
exports.Client = require('./xmpp-client/client').Client;
|
exports.Client = require('./xmpp-client/client').Client;
|
||||||
exports.jid = require('./xmpp-client/client').jid;
|
exports.Jid = require('./xmpp-client/client').Jid;
|
@ -1,19 +1,25 @@
|
|||||||
var sys = require('sys'),
|
var sys = require('sys'),
|
||||||
client = require('../lib/xmpp-client').Client,
|
Client = require('../lib/xmpp-client').Client,
|
||||||
jid = require('../lib/xmpp-client').jid;
|
Jid = require('../lib/xmpp-client').Jid;
|
||||||
|
|
||||||
exports.testJid = function(test) {
|
exports.testJid = function(test) {
|
||||||
var j = jid('mathieu@gtalk.com');
|
var j = new Jid('mathieu@gtalk.com');
|
||||||
//sys.debug(JSON.stringify(j));
|
//sys.debug(JSON.stringify(j));
|
||||||
test.equals('mathieu', j.node);
|
test.equals('mathieu', j.node);
|
||||||
test.equals('gtalk.com', j.domain);
|
test.equals('gtalk.com', j.domain);
|
||||||
test.equals(null, j.resource);
|
test.equals(null, j.resource);
|
||||||
j = jid('mathieu@jabber.org/node');
|
j = new Jid('mathieu@jabber.org/node');
|
||||||
//sys.debug(JSON.stringify(j));
|
//sys.debug(JSON.stringify(j));
|
||||||
test.equals('node', j.resource);
|
test.equals('node', j.resource);
|
||||||
test.done();
|
test.done();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exports.testClient = function(test) {
|
||||||
|
var c = new Client('mathieu@gtalk.com', 'toto');
|
||||||
|
test.equals('gtalk.com', c.host);
|
||||||
|
test.done();
|
||||||
|
};
|
||||||
|
|
||||||
if(module.id == '.'){
|
if(module.id == '.'){
|
||||||
var testrunner = require('nodeunit').testrunner;
|
var testrunner = require('nodeunit').testrunner;
|
||||||
testrunner.run([__filename]);
|
testrunner.run([__filename]);
|
||||||
|
Loading…
Reference in new issue