supertest icon indicating copy to clipboard operation
supertest copied to clipboard

Fix `end()` not called when app is started manually

Open nunofgs opened this issue 5 years ago • 0 comments

Supertest supports passing previously-started apps, ie:

const app = express();
const server = app.listen();

...

await request(server)
  .get('/user')
  .expect(200);

However, when used this way, the server was never called with end().

Note: tests are not passing but not due to this change (already failing in master).

Fixes #634

nunofgs avatar May 15 '20 23:05 nunofgs