Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.end() method is not called #430

Closed
poojasingh14 opened this issue Aug 22, 2017 · 2 comments
Closed

.end() method is not called #430

poojasingh14 opened this issue Aug 22, 2017 · 2 comments
Labels
too-old Item to old

Comments

@poojasingh14
Copy link

I am using supertest 3.0.0.
The control is not going inside .end method. Please let me know in which situations this happens?

supertest(app)
.post(URL)
.set(header)
.attach(payload)
.end((err, res) => {
  if (err) {
    done(err);
  }
  done();
});
@JakubSimandl
Copy link

Any update on this?

@kepikoi
Copy link

kepikoi commented Dec 12, 2018

I made a small repo to test for this exact issue and express still doesn't quit on 3.3.0 https://github.com/kepikoi/supertest-issue-430

PS C:\www\supertest-issue-430> npm test

> [email protected] test C:\www\supertest-issue-430
> tape index.spec.js

listening on port 3301
TAP version 13
# /test should reply with 200
ok 1 /test replied with 200
not ok 2 failed to shut down express
  ---
    operator: fail
    at: Timeout.setTimeout [as _onTimeout] (C:\www\supertest-issue-430\index.spec.js:21:11)
    stack: |-
      Error: failed to shut down express
          at Test.assert [as _assert] (C:\www\supertest-issue-430\node_modules\tape\lib\test.js:224:54)
          at Test.bound [as _assert] (C:\www\supertest-issue-430\node_modules\tape\lib\test.js:76:32)
          at Test.fail (C:\www\supertest-issue-430\node_modules\tape\lib\test.js:317:10)
          at Test.bound [as fail] (C:\www\supertest-issue-430\node_modules\tape\lib\test.js:76:32)
          at Timeout.setTimeout [as _onTimeout] (C:\www\supertest-issue-430\index.spec.js:21:11)
          at ontimeout (timers.js:424:11)
          at tryOnTimeout (timers.js:288:5)
          at listOnTimeout (timers.js:251:5)
          at Timer.processTimers (timers.js:211:10)
  ...
npm ERR! Test failed.  See above for more details.

@rimiti rimiti added the too-old Item to old label Mar 9, 2019
@rimiti rimiti closed this as completed Mar 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
too-old Item to old
Projects
None yet
Development

No branches or pull requests

4 participants