From a3d9e7703a8d8a6ddcc8dd1adf65b577a5919bdc Mon Sep 17 00:00:00 2001 From: Vallie Joseph Date: Mon, 31 Jul 2023 20:33:04 +0000 Subject: [PATCH] udpating proxy call --- packages/github/__tests__/github.proxy.test.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/github/__tests__/github.proxy.test.ts b/packages/github/__tests__/github.proxy.test.ts index 2549bd9f..bcc54368 100644 --- a/packages/github/__tests__/github.proxy.test.ts +++ b/packages/github/__tests__/github.proxy.test.ts @@ -1,6 +1,7 @@ +// eslint-disable-next-line filenames/match-regex import * as http from 'http' import * as https from 'https' -import proxy from 'proxy' +import { createProxy } from 'proxy'; // Default values are set when the module is imported, so we need to set proxy first. const proxyUrl = 'http://127.0.0.1:8081' @@ -16,7 +17,7 @@ describe('@actions/github', () => { beforeAll(async () => { // Start proxy server - proxyServer = proxy() + proxyServer = createProxy(http.createServer()); await new Promise(resolve => { const port = Number(proxyUrl.split(':')[2]) proxyServer.listen(port, () => resolve('mockResolve'))