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.

18 lines
476 B

var sys = require('sys'),
colors = require('colors'),
JID = require('node-xmpp').JID,
conf = require('./conf').conf;
exports.testJid = function(test) {
test.expect(4);
var j = new JID('mathieu@gtalk.com');
//sys.debug(JSON.stringify(j));
test.equals('mathieu', j.user);
test.equals('gtalk.com', j.domain);
test.equals(null, j.resource);
j = new JID('mathieu@jabber.org/machin');
//sys.debug(JSON.stringify(j));
test.equals('machin', j.resource);
test.done();
};