Wrote tests for the event listener