supertest icon indicating copy to clipboard operation
supertest copied to clipboard

`abort` broken in 6.2.2 release

Open jimmydief opened this issue 2 years ago • 2 comments

A regression related to aborting requests seems to have occurred in the supertest 6.1.6 => 6.2.2 release. superagent was upgraded at that time so the root cause may be there.

Requests do not appear to be receiving the "aborted" event when aborted via supertest.

I originally reproduced in Node 14.16.1 but confirmed that the same behavior affects 16.14.0 as well.

Repro: https://github.com/jimmydief/supertest-abort-bug-repro

  System:
    OS: macOS 11.6.4
  Binaries:
    Node: 14.16.1 - /usr/local/bin/node
    npm: 6.14.12 - /usr/local/bin/npm

jimmydief avatar Mar 15 '22 05:03 jimmydief

I see this test failing on node 16.13.1 on any version of supertest (including 6.1.6), but passing on an earlier version of node (say 12.20.1).

alexsorokin-at avatar Mar 18 '22 22:03 alexsorokin-at

@alexsorokin-at I think that's due to https://github.com/nodejs/node/issues/40775.

jimmydief avatar Mar 22 '22 05:03 jimmydief