From 7a36924c5319254a34f95dc91023285365a6deed Mon Sep 17 00:00:00 2001 From: uzlopak Date: Sat, 27 Jan 2024 01:55:44 +0100 Subject: [PATCH] chore: remove delay dev dependency --- package.json | 1 - test/node-fetch/main.js | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 3032b5608af..f7f5c1d3e36 100644 --- a/package.json +++ b/package.json @@ -111,7 +111,6 @@ "chai-string": "^1.5.0", "concurrently": "^8.0.1", "cronometro": "^1.0.5", - "delay": "^5.0.0", "dns-packet": "^5.4.0", "docsify-cli": "^4.4.3", "form-data": "^4.0.0", diff --git a/test/node-fetch/main.js b/test/node-fetch/main.js index d702a2743fc..72a86b20639 100644 --- a/test/node-fetch/main.js +++ b/test/node-fetch/main.js @@ -10,8 +10,8 @@ const crypto = require('crypto') const chaiPromised = require('chai-as-promised') const chaiIterator = require('chai-iterator') const chaiString = require('chai-string') -const delay = require('delay') const { Blob } = require('buffer') +const { setTimeout } = require('timers/promises') const { fetch, @@ -761,7 +761,7 @@ describe('node-fetch', () => { it('should collect handled errors on the body stream to reject if the body is used later', () => { const url = `${base}invalid-content-encoding` - return fetch(url).then(delay(20)).then(res => { + return fetch(url).then(setTimeout(20)).then(res => { expect(res.headers.get('content-type')).to.equal('text/plain') return expect(res.text()).to.eventually.be.rejected })