I suppose, technically, the only way to completely eliminate non-determinism here would be to use mocks, but I think getting rid of setTimeout removes at least some of the magic here, and I think the above fix should be easy.  

In reality, mocha is going to timeout tests that take too long to run anyway.