Patrick Steele-Idem bc384549f6 Updated tests
2017-02-21 17:16:53 -07:00

26 lines
556 B
JavaScript

var pubsub = require('~/util/pubsub');
module.exports = {
onInput: function(input) {
this.name = input.name;
this.channel = input.channel;
},
onMount: function() {
var self = this;
if (this.channel) {
pubsub.channel(this.channel).on('emitTestEvent2', function() {
self.emitTestEvent2();
});
}
},
emitTestEvent1: function() {
this.emit('testEvent', 'a', 'b');
},
emitTestEvent2: function() {
this.emit('testEvent');
}
};