Spaces:
Runtime error
Runtime error
File size: 381 Bytes
23ac194 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
'use strict'
const { test } = require('node:test')
const Response = require('../lib/response')
test('multiple calls to res.destroy should not be called', (t, done) => {
t.plan(2)
const mockReq = {}
const res = new Response(mockReq, (err) => {
t.assert.ok(err)
t.assert.strictEqual(err.code, 'LIGHT_ECONNRESET')
done()
})
res.destroy()
res.destroy()
})
|