diff --git a/test/http2-body-delete.js b/test/http2-body-delete.js index 9ba5b973aa2..2eaf7fad224 100644 --- a/test/http2-body-delete.js +++ b/test/http2-body-delete.js @@ -8,6 +8,7 @@ const assert = require('node:assert') const pem = require('@metcoder95/https-pem') const { Client } = require('..') +const { guardAgainstUnexpectedDisconnect } = require('./utils/h2-disconnect-guard') test('Should handle h2 DELETE request with body', async t => { const server = createSecureServer(await pem.generate({ opts: { keySize: 2048 } })) @@ -45,6 +46,8 @@ test('Should handle h2 DELETE request with body', async t => { }) after(() => client.close()) + guardAgainstUnexpectedDisconnect(assert, client) + const response = await client.request({ path: '/', method: 'DELETE', @@ -90,6 +93,8 @@ test('Should not send Content-Length for h2 DELETE without body', async t => { }) after(() => client.close()) + guardAgainstUnexpectedDisconnect(assert, client) + const response = await client.request({ path: '/', method: 'DELETE'