You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
703 B
26 lines
703 B
var sys = require('sys'),
|
|
Client = require('../lib/xmpp-client').Client,
|
|
Jid = require('../lib/xmpp-client').Jid;
|
|
|
|
exports.testJid = function(test) {
|
|
var j = new Jid('mathieu@gtalk.com');
|
|
//sys.debug(JSON.stringify(j));
|
|
test.equals('mathieu', j.node);
|
|
test.equals('gtalk.com', j.domain);
|
|
test.equals(null, j.resource);
|
|
j = new Jid('mathieu@jabber.org/node');
|
|
//sys.debug(JSON.stringify(j));
|
|
test.equals('node', j.resource);
|
|
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 == '.'){
|
|
var testrunner = require('nodeunit').testrunner;
|
|
testrunner.run([__filename]);
|
|
} |