diff --git a/lib/body.js b/lib/body.js index 6a517a2..62286bd 100644 --- a/lib/body.js +++ b/lib/body.js @@ -146,7 +146,7 @@ class Body { // do the pipe in the promise, because the pipe() can send too much // data through right away and upset the MP Sized object - return new Promise((resolve, reject) => { + return new Promise((resolve) => { // if the stream is some other kind of stream, then pipe through a MP // so we can collect it more easily. if (stream !== upstream) { diff --git a/lib/index.js b/lib/index.js index 77e8255..da40216 100644 --- a/lib/index.js +++ b/lib/index.js @@ -103,7 +103,7 @@ const fetch = async (url, opts) => { let reqTimeout = null if (request.timeout) { - req.once('socket', socket => { + req.once('socket', () => { reqTimeout = setTimeout(() => { reject(new FetchError(`network timeout at: ${ request.url}`, 'request-timeout')) diff --git a/test/index.js b/test/index.js index bc4bf49..e0aa4f2 100644 --- a/test/index.js +++ b/test/index.js @@ -843,7 +843,7 @@ t.test('cancel request body stream with AbortError when aborted', { }) const result = Promise.all([ - new Promise((resolve, reject) => { + new Promise((resolve) => { body.on('error', (error) => { t.match(error, { name: 'AbortError' }) resolve()