Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix EventEmitter bug #323
@geek I finally managed to reproduce the bug reliably !
So basically the explanation is the domain of the beforeEach captures the event emitter that's created, and if it crashes in the context of the test, the error is not caught by the
I have an idea how to fix it but that's gonna be weird : we should transfer the list of
@geek so my solution wasn't possible, since we don't manually register EEs and there's no way to get a list of them, and anyway it would have been functionally wrong.
Here's a patch that should fix domains once and for all, but it's not pretty. I can't say I'm 100% sure we won't see other edge cases considering the complexity of domains.
What happens with this patch is, since we can't know the exact origin of the error (still looking into that), we'll make all the started tests depending on an EE crash.
To compensate, I'm now bringing back the real call stacks, so even if all of your tests crash, you will at least see the origin.
Another issue that will need to be fixed is errors that happen once the test suite is finished, they just go silent, but honestly after this patch I just wanna die so it'll wait :)