setup karma framework for test and wrote tests for events