bree
bree copied to clipboard
[test] cover node's internal 'messageerror' event with tests
Problem
Test coverage is turned off for messageerror
events with a comment to fix it:
// NOTE: you cannot catch messageerror since it is a Node internal // (if anyone has any idea how to catch this in tests let us know)
Research
Have started a discussion in node repository around best ways to handle such cases - https://github.com/nodejs/node/issues/36333#issuecomment-740238122. The best advice to tackle it so far has been:
I would currently recommend just to emit the events directly
Next
Simulating these events directly as suggested would be a next thing to try here.
Note, opening up an issue here so it's easier to track progress and any information that comes up on this topic in the future.