I worry that in cases where we are timing out, the attempt to listen might actually be producing an error, and we are simply dropping this error on the floor. If that is what's happening, we should now surface the error by rejecting the promise returned by the beforeEach block instead of just timing out in a waitsFor function.
I'm also waiting for the server to fully close in the afterEach block, just to be sure we stop listening before attempting to listen again. This seems unlikely, but it's more correct to wait for this anyway.
This is an attempt to fix #386.
I worry that in cases where we are timing out, the attempt to listen might actually be producing an error, and we are simply dropping this error on the floor. If that is what's happening, we should now surface the error by rejecting the promise returned by the
beforeEach
block instead of just timing out in awaitsFor
function.I'm also waiting for the server to fully close in the
afterEach
block, just to be sure we stop listening before attempting to listen again. This seems unlikely, but it's more correct to wait for this anyway.