atom / fuzzy-finder

Find and open files quickly
MIT License
274 stars 138 forks source link

Avoid timeouts when listening on a socket in tests #398

Closed nathansobo closed 5 years ago

nathansobo commented 5 years ago

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 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.