From 39af35197225a07134f49c99f4e4de2095659d13 Mon Sep 17 00:00:00 2001 From: uzlopak Date: Sat, 2 Mar 2024 16:47:51 +0100 Subject: [PATCH] chore: remove proxyquire --- package.json | 1 - test/pool.js | 9 +++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index bc1d2f6520c..d71bac7a179 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,6 @@ "jsfuzz": "^1.0.15", "pre-commit": "^1.2.2", "proxy": "^2.1.1", - "proxyquire": "^2.1.3", "snazzy": "^9.0.0", "standard": "^17.0.0", "tsd": "^0.30.1", diff --git a/test/pool.js b/test/pool.js index 5e84f4402bb..b75cd530d43 100644 --- a/test/pool.js +++ b/test/pool.js @@ -11,7 +11,6 @@ const { Readable } = require('node:stream') const { promisify } = require('node:util') -const proxyquire = require('proxyquire') const { kBusy, kPending, @@ -366,17 +365,15 @@ test('backpressure algorithm', async (t) => { } } - const Pool = proxyquire('../lib/dispatcher/pool', { - './client': FakeClient - }) - const noopHandler = { onError (err) { throw err } } - const pool = new Pool('http://notahost') + const pool = new Pool('http://notahost', { + factory: () => new FakeClient() + }) pool.dispatch({}, noopHandler) pool.dispatch({}, noopHandler)