You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given my current understand of the spec the following unit test (from node-fetch) should always fail:
it('should reject response body methods immediately with AbortError when aborted before stream is disturbed',()=>{returnexpect(fetch(`${base}slow`,{signal: controller.signal})).to.eventually.be.fulfilled.then(res=>{controller.abort()returnexpect(res.text()).to.eventually.be.rejected.and.be.an.instanceof(Error).and.have.property('name','AbortError')})})
The response is cancelled before res.text() starts reading from the response body and given the current way ReadableStream.cancel works we will just read an empty string as success. There is no propagation of the abort error to the reader of the response stream.
Given my current understand of the spec the following unit test (from node-fetch) should always fail:
The response is cancelled before
res.text()
starts reading from the response body and given the current wayReadableStream.cancel
works we will just read an empty string as success. There is no propagation of the abort error to the reader of the response stream.Refs: nodejs/node#39715
The text was updated successfully, but these errors were encountered: