Skip to content

Instantly share code, notes, and snippets.

@oranheim
Created June 26, 2014 11:29
Show Gist options
  • Save oranheim/03acc65ac14bacd9d386 to your computer and use it in GitHub Desktop.
Save oranheim/03acc65ac14bacd9d386 to your computer and use it in GitHub Desktop.
'use strict';
/**
* Created by ora on 27.03.14.
*/
var eeService = require(__dirname + '/eeService.js'),
EventService = eeService.EventService;
describe('Test EventEmitter', function () {
describe('Call EE', function () {
it('should pass ee callback', function () {
var emitter = new EventService();
emitter.on('greet', function(name) {
console.log('Hello, ' + name);
});
['foo', 'bar', 'baz'].forEach(function(name) {
//console.log(name);
emitter.emit('greet', name);
});
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment