mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-04-01 01:33:17 +08:00
tests
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import * as http from 'http'
|
||||
import * as https from 'https'
|
||||
import { createProxy } from 'proxy'
|
||||
import { proxy } 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 = createProxy()
|
||||
proxyServer = proxy()
|
||||
await new Promise<void>(resolve => {
|
||||
const port = Number(proxyUrl.split(':')[2])
|
||||
proxyServer.listen(port, () => resolve())
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as http from 'http'
|
||||
import { createProxy } from 'proxy'
|
||||
import { proxy } 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 = createProxy()
|
||||
proxyServer = proxy()
|
||||
await new Promise(resolve => {
|
||||
const port = Number(proxyUrl.split(':')[2])
|
||||
proxyServer.listen(port, () => resolve(null))
|
||||
|
||||
Reference in New Issue
Block a user