notification message
This commit is contained in:
parent
16aa5ae981
commit
749531f597
@ -23,8 +23,8 @@ var Client = function(config) {
|
||||
this.password = config.password || defaults.password;
|
||||
this.encoding = 'utf8';
|
||||
var self = this;
|
||||
this.connection.on('notify', function(msg) {
|
||||
self.emit('notify', msg);
|
||||
this.connection.on('notification', function(msg) {
|
||||
self.emit('notification', msg);
|
||||
})
|
||||
};
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
var helper = require(__dirname + "/test-helper");
|
||||
test('passes connection notification', function() {
|
||||
var client = new Client();
|
||||
assert.emits(client, 'notify', function(msg) {
|
||||
assert.emits(client, 'notification', function(msg) {
|
||||
assert.equal(msg, "HAY!!");
|
||||
})
|
||||
client.connection.emit('notify', "HAY!!");
|
||||
client.connection.emit('notification', "HAY!!");
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user