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.

27 lines
740 B

var sys = require('sys'),
colors = require('colors'),
xmpp = require('node-xmpp'),
BasicClient = require('../lib/xmpp-client').BasicClient,
JID = require('node-xmpp').JID,
conf = require('./conf').conf;
exports.testInit = function(test) {
test.expect(1);
var b = new BasicClient(conf.b, function() {
sys.debug('just connected');
test.ok(true, 'connected');
test.done();
});
};
exports.testIq = function(test) {
test.expect(1);
new BasicClient(conf.b, function() {
this.iq(null, new xmpp.Element('query', {xmlns: 'jabber:iq:roster'}), function(iq) {
var roster = iq.getChild('query', 'jabber:iq:roster').getChildren('item');
sys.debug(roster);
test.notEqual(null, roster, 'roster');
test.done();
});
});
};