mirror of https://github.com/actions/toolkit
udpating proxy call
parent
7a78c830aa
commit
a3d9e7703a
|
@ -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'))
|
||||
|
|
Loading…
Reference in New Issue