I see your point. You don't want the unit test to have to add the event listeners since that's not being tested and it will cause the test to be slower. But on the other hand, the code that runs on the device will have to execute an extra conditional expression that's not needed. So, either we optimize for unit testing or we optimize for the code running on the device. I think we should always optimize for the code running on the device unless there is significant issue with the tests. In this case, I don't think there will be a significant issue with the unit tests adding the event listeners.