Skip to content

Commit

Permalink
chore: remove proxyquire (#2906)
Browse files Browse the repository at this point in the history
  • Loading branch information
Uzlopak committed Mar 3, 2024
1 parent 1dbb0aa commit 3608e61
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
1 change: 0 additions & 1 deletion package.json
Expand Up @@ -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",
Expand Down
9 changes: 3 additions & 6 deletions test/pool.js
Expand Up @@ -11,7 +11,6 @@ const {
Readable
} = require('node:stream')
const { promisify } = require('node:util')
const proxyquire = require('proxyquire')
const {
kBusy,
kPending,
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 3608e61

Please sign in to comment.