Adding passing test for preventing the end event from firing multiple times