forwardemail / forwardemail/supertest

Concurrent requests result in ECONNREFUSED

Open
#726 2 comments 2 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
14.4k
Forks
782
PR merge metrics
No merged PRs in 30d

Description

Hi there! 👋

I am attempting to write an integration test case with supertest in which a couple requests are sent to the app concurrently. However, I get an `ECONNREFUSED` error when the test is executed. Is it possible to support concurrent requests?

Attempted usage:
```js
it('can make concurrent GET requests to the app', async () => {
const request1 = testApp.get('/');
const request2 = testApp.get('/');
await request1.expect(200);
await request2.expect(200);
});
```

Here is a demo repo where the issue can be easily reproduced: https://github.com/Drew-Kimberly/supertest-repro

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.