ziga-miklic
Joined 12 years ago
Karma
74
Submissions
8
Member since
Sep 9
Joined 12 years ago
Normally, if unit tests were missing, I would add them before starting refactoring. In this case, to be honest, I'm not sure how I could have written a unit test to catch the issue. An E2E test is the only one that comes to mind. Please let me know if I am missing an easy way to test for a 404 image when offline. Thank you!
> ...if there is a good reason for the current approach, document it. Add a more descriptive name or a comment to avoid confusion in the future.
With enums/static variables are you referring to custom events or also DOM events? For custom-based events we use that approach but not for DOM events. If you do use it for DOM events, I'm curious to know more about it. Thank you!