Updates all async tests to avoid using done() when possible, as supertest/chai now handles async properly as long as you return the request/promise. This mitigates the timeout issues where tests are perceived as passing/failing because the previous test times out (waiting on a resolve that'll never happen as it's in a reject state).
An alternative is to use .end((err, res) => {...} where you handle the err case and return done(err) and if success, return done() but this is almost as messy as it was before, and complicates the tests using Promise.all(...)
Updates all async tests to avoid using done() when possible, as supertest/chai now handles async properly as long as you return the request/promise. This mitigates the timeout issues where tests are perceived as passing/failing because the previous test times out (waiting on a resolve that'll never happen as it's in a reject state).
Example from https://github.com/visionmedia/supertest
An alternative is to use
.end((err, res) => {...}
where you handle the err case andreturn done(err)
and if success,return done()
but this is almost as messy as it was before, and complicates the tests using Promise.all(...)