fix tests

This commit is contained in:
Tatyana Kostromskaya
2023-09-15 13:45:26 +00:00
parent 8c1e6a00f0
commit 2e5b10e3bd
4 changed files with 40 additions and 8 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
import * as http from 'http'
import * as proxy from 'proxy'
import { createProxy } from 'proxy'
import {getOctokit} from '../src/github'
import {GitHub, getOctokitOptions} from '../src/utils'
@@ -12,7 +12,7 @@ describe('@actions/github', () => {
beforeAll(async () => {
// Start proxy server
proxyServer = proxy.createProxy()
proxyServer = createProxy()
await new Promise(resolve => {
const port = Number(proxyUrl.split(':')[2])
proxyServer.listen(port, () => resolve(null))