try to fix tests

This commit is contained in:
Tatyana Kostromskaya committed 2023-09-15 15:04:21 +00:00
1 parent fbd895e539
commit 4ac965b96a
5 files changed
+37 -5

No files matched your search

+2 -2
View File
@@ -1,6 +1,6 @@
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 +16,7 @@ describe('@actions/github', () => {
beforeAll(async () => {
// Start proxy server
proxyServer = proxy()
proxyServer = createProxy()
await new Promise<void>(resolve => {
const port = Number(proxyUrl.split(':')[2])
proxyServer.listen(port, () => resolve())
+2 -2
View File
@@ -1,5 +1,5 @@
import * as http from 'http'
import { 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()
proxyServer = createProxy()
await new Promise(resolve => {
const port = Number(proxyUrl.split(':')[2])
proxyServer.listen(port, () => resolve(null))
+1 -1
View File
@@ -1,4 +1,4 @@
declare module 'proxy' {
declare module 'proxy1' {
import * as http from 'http'
function internal(): http.Server
export = internal