grandma
grandma copied to clipboard
error handle tests so that they don't bring down threads
Try/catch would only handle synchronous tests, and I believe that this is a very small set of tests. Most grandma
users, I believe, are writing async tests.
The way to handle this would be using domains. However, they are deprecated, and no replacement has been made available. Not sure if I should invest in using them and supporting this as a feature.
grandma
already provides a callback that accepts errors, so in theory, the test writer should be handling errors. This does not really account for things like stream errors, which devs often forget to handle.