mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-05-04 13:18:06 +08:00
Make sure RequestOptions.keepAlive is applied properly on node20 runtime (#1572)
This commit is contained in:
@@ -11,6 +11,12 @@ describe('basics', () => {
|
||||
_http.dispose()
|
||||
})
|
||||
|
||||
it.each([true, false])('creates Agent with keepAlive %s', keepAlive => {
|
||||
const http = new httpm.HttpClient('http-client-tests', [], {keepAlive})
|
||||
const agent = http.getAgent('http://postman-echo.com')
|
||||
expect(agent).toHaveProperty('keepAlive', keepAlive)
|
||||
})
|
||||
|
||||
it('does basic http get request with keepAlive true', async () => {
|
||||
const res: httpm.HttpClientResponse = await _http.get(
|
||||
'http://postman-echo.com/get'
|
||||
|
||||
Reference in New Issue
Block a user