Updated abort behavior (#1141)
* Updated abort behavior - Support for aborting a request with the promise api - Aborting a request will cause a RequestAbortedError - Normalized Connection class errors, now every error returned is wrapped by the client errors constructors * Updated test * Updated docs * Updated code generation script * Renamed test * Code coverage * Avoid calling twice transport.request
This commit is contained in:
committed by
GitHub
parent
953a8033ab
commit
27a8e2a9bf
@ -135,7 +135,7 @@ test('Abort method (callback)', t => {
|
||||
})
|
||||
})
|
||||
|
||||
test('Abort is not supported in promises', t => {
|
||||
test('Abort method (promises)', t => {
|
||||
t.plan(2)
|
||||
|
||||
function handler (req, res) {
|
||||
@ -160,7 +160,7 @@ test('Abort is not supported in promises', t => {
|
||||
})
|
||||
.catch(t.fail)
|
||||
|
||||
t.type(request.abort, 'undefined')
|
||||
t.type(request.abort, 'function')
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user