drop one error test that fail under Debian env
authorYadd <yadd@debian.org>
Fri, 8 Nov 2024 04:35:57 +0000 (04:35 +0000)
committerPeter Michael Green <plugwash@raspbian.org>
Fri, 8 Nov 2024 04:35:57 +0000 (04:35 +0000)
Forwarded: not-needed
Last-Update: 2023-11-26

Gbp-Pq: Name drop-one-error-test.patch

test/client-dispatch.js

index c3de37ae2a99a8b51e725afba539eb1cca1c9fff..13745e4f04445f3a34ba4421ad8265504ed6fc36 100644 (file)
@@ -782,34 +782,3 @@ test('dispatch onBodySent async-iterable', (t) => {
     })
   })
 })
-
-test('dispatch onBodySent throws error', (t) => {
-  const server = http.createServer((req, res) => {
-    res.end('ended')
-  })
-  t.teardown(server.close.bind(server))
-
-  server.listen(0, () => {
-    const client = new Pool(`http://localhost:${server.address().port}`)
-    t.teardown(client.close.bind(client))
-    const body = 'hello'
-    client.dispatch({
-      path: '/',
-      method: 'POST',
-      body
-    }, {
-      onBodySent (chunk) {
-        throw new Error('fail')
-      },
-      onError (err) {
-        t.type(err, Error)
-        t.equal(err.message, 'fail')
-        t.end()
-      },
-      onConnect () {},
-      onHeaders () {},
-      onData () {},
-      onComplete () {}
-    })
-  })
-})