This commit is contained in:
Tatyana Kostromskaya
2023-10-04 15:33:15 +00:00
parent 774f139bef
commit f699b96ecf
9 changed files with 474 additions and 382 deletions

View File

@@ -299,7 +299,7 @@ describe('proxy', () => {
it('proxy settings return ProxyAgent', async () => {
process.env['https_proxy'] = 'http://127.0.0.1:8080'
const httpClient = new httpm.HttpClient()
const agent: Agent | ProxyAgent = httpClient.getAgentDispatcher('https://some-url')
const agent = httpClient.getAgentDispatcher('https://some-url')
// eslint-disable-next-line no-console
console.log(agent)
expect(agent instanceof ProxyAgent).toBe(true)
@@ -307,10 +307,10 @@ describe('proxy', () => {
it('proxyAuth is set in tunnel agent when authentication is provided', async () => {
const httpClient = new httpm.HttpClient()
const agent: Agent | ProxyAgent = httpClient.getAgentDispatcher('https://some-url')
const agent = httpClient.getAgentDispatcher('https://some-url')
// eslint-disable-next-line no-console
console.log(agent)
expect(agent instanceof Agent).toBe(true)
expect(agent).toBe(undefined)
})
})