1
0
Fork 0
mirror of https://github.com/actions/toolkit synced 2025-05-09 00:22:56 +00:00

Make sure RequestOptions.keepAlive is applied properly on node20 runtime (#1572)

This commit is contained in:
teatimeguest 2024-02-29 02:10:57 +09:00 committed by GitHub
parent df3315bbea
commit ff435e591d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 8 deletions

View file

@ -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'