diff --git a/test/node-fetch/main.js b/test/node-fetch/main.js index e1df2ffeb04..77a61a29454 100644 --- a/test/node-fetch/main.js +++ b/test/node-fetch/main.js @@ -780,9 +780,8 @@ describe('node-fetch', () => { } ) ] - setTimeout(() => { - controller.abort() - }, 100) + + controller.abort() return Promise.all(fetches.map(fetched => expect(fetched) .to.eventually.be.rejected @@ -806,9 +805,8 @@ describe('node-fetch', () => { } ) ] - setTimeout(() => { - controller.abort() - }, 100) + + controller.abort() return Promise.all(fetches.map(fetched => expect(fetched) .to.eventually.be.rejected