Too Long; Didn't Read
Pattern is a patch using a pattern I am somewhat uncomfortable with as a tester, but given the amount of code already in place, this seemed like a reasonable option. The pattern discussed would allow for both sets of functionality to be wrapped in such a way that they can be removed, as needed. This functionality allowed the IDs to be stored in a way they could be removed as the tests iterated. With this code, we can simply test the function inside the setTimeout function. The timer behavior could be mocked.