1
0
Fork 0
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.

20 lines
554 B

var sys = require('sys'),
client = require('../lib/xmpp-client').Client,
jid = require('../lib/xmpp-client').jid;
exports.testJid = function(test) {
var j = 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 = jid('mathieu@jabber.org/node');
//sys.debug(JSON.stringify(j));
test.equals('node', j.resource);
test.done();
};
if(module.id == '.'){
var testrunner = require('nodeunit').testrunner;
testrunner.run([__filename]);
}