2011-03-04 12:55:06 +08:00
|
|
|
var helper = require(__dirname + "/test-helper");
|
2014-06-16 05:33:23 +08:00
|
|
|
|
2011-03-04 12:55:06 +08:00
|
|
|
test('passes connection notification', function() {
|
2011-03-05 04:04:59 +08:00
|
|
|
var client = helper.client();
|
|
|
|
assert.emits(client, 'notice', function(msg) {
|
2011-03-04 12:55:06 +08:00
|
|
|
assert.equal(msg, "HAY!!");
|
|
|
|
})
|
2011-03-05 04:04:59 +08:00
|
|
|
client.connection.emit('notice', "HAY!!");
|
2011-03-04 12:55:06 +08:00
|
|
|
})
|
|
|
|
|