update to unit tests to use events.emit instead of events.call