Skip to content

Commit 3608e61

Browse files
authored
chore: remove proxyquire (#2906)
1 parent 1dbb0aa commit 3608e61

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@
110110
"jsfuzz": "^1.0.15",
111111
"pre-commit": "^1.2.2",
112112
"proxy": "^2.1.1",
113-
"proxyquire": "^2.1.3",
114113
"snazzy": "^9.0.0",
115114
"standard": "^17.0.0",
116115
"tsd": "^0.30.1",

test/pool.js

+3-6
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ const {
1111
Readable
1212
} = require('node:stream')
1313
const { promisify } = require('node:util')
14-
const proxyquire = require('proxyquire')
1514
const {
1615
kBusy,
1716
kPending,
@@ -366,17 +365,15 @@ test('backpressure algorithm', async (t) => {
366365
}
367366
}
368367

369-
const Pool = proxyquire('../lib/dispatcher/pool', {
370-
'./client': FakeClient
371-
})
372-
373368
const noopHandler = {
374369
onError (err) {
375370
throw err
376371
}
377372
}
378373

379-
const pool = new Pool('http://notahost')
374+
const pool = new Pool('http://notahost', {
375+
factory: () => new FakeClient()
376+
})
380377

381378
pool.dispatch({}, noopHandler)
382379
pool.dispatch({}, noopHandler)

0 commit comments

Comments
 (0)