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