refactoring event emitter tests to use sinon