add unit test dependency, and tests for event service

@deini @alexmckenley 
Should the tests be wrapped in an IIFE?