It should be possible to respond from a middleware piece, without needing a matching listener.
e.g. To give a message before ignoring.
I've added an e2e test to show that it works, but it throws unless the function is async and awaits the respond call, before calling the done function.
I don't think that's desirable simply because it's too easy to miss it.
It should be possible to respond from a middleware piece, without needing a matching listener. e.g. To give a message before ignoring.
I've added an e2e test to show that it works, but it throws unless the function is async and awaits the respond call, before calling the
done
function.I don't think that's desirable simply because it's too easy to miss it.
e.g.
The following throws...
The following works...
Here's a workaround for simple promise return...