mirror of https://github.com/actions/toolkit
adding updated lints and fixes
parent
ba96334e72
commit
20e1b242c8
|
@ -239,7 +239,7 @@ describe('Download Tests', () => {
|
|||
*/
|
||||
async function emptyMockReadBody(): Promise<string> {
|
||||
return new Promise(resolve => {
|
||||
resolve()
|
||||
resolve('mockResolve')
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ beforeAll(async () => {
|
|||
*/
|
||||
async function emptyMockReadBody(): Promise<string> {
|
||||
return new Promise(resolve => {
|
||||
resolve()
|
||||
resolve('mockResolved')
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -429,7 +429,7 @@ describe('Upload Tests', () => {
|
|||
*/
|
||||
async function emptyMockReadBody(): Promise<string> {
|
||||
return new Promise(resolve => {
|
||||
resolve()
|
||||
resolve('mockResolve')
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -461,8 +461,7 @@ describe('Upload Tests', () => {
|
|||
fileContainerResourceUrl: `${getRuntimeUrl()}_apis/resources/Containers/13`,
|
||||
type: 'actions_storage',
|
||||
name: inputData.Name,
|
||||
url: `${getRuntimeUrl()}_apis/pipelines/1/runs/1/artifacts?artifactName=${
|
||||
inputData.Name
|
||||
url: `${getRuntimeUrl()}_apis/pipelines/1/runs/1/artifacts?artifactName=${inputData.Name
|
||||
}`
|
||||
}
|
||||
const returnData: string = JSON.stringify(response, null, 2)
|
||||
|
|
|
@ -113,8 +113,7 @@ export class DownloadHttpClient {
|
|||
|
||||
if (core.isDebug()) {
|
||||
core.debug(
|
||||
`File: ${++downloadedFiles}/${downloadItems.length}. ${
|
||||
currentFileToDownload.targetPath
|
||||
`File: ${++downloadedFiles}/${downloadItems.length}. ${currentFileToDownload.targetPath
|
||||
} took ${(performance.now() - startTime).toFixed(
|
||||
3
|
||||
)} milliseconds to finish downloading`
|
||||
|
@ -328,7 +327,7 @@ export class DownloadHttpClient {
|
|||
})
|
||||
.pipe(destinationStream)
|
||||
.on('close', () => {
|
||||
resolve()
|
||||
resolve('closed')
|
||||
})
|
||||
.on('error', error => {
|
||||
core.info(
|
||||
|
@ -347,7 +346,7 @@ export class DownloadHttpClient {
|
|||
})
|
||||
.pipe(destinationStream)
|
||||
.on('close', () => {
|
||||
resolve()
|
||||
resolve('closed')
|
||||
})
|
||||
.on('error', error => {
|
||||
core.info(
|
||||
|
|
|
@ -19,7 +19,7 @@ describe('@actions/github', () => {
|
|||
proxyServer = proxy()
|
||||
await new Promise(resolve => {
|
||||
const port = Number(proxyUrl.split(':')[2])
|
||||
proxyServer.listen(port, () => resolve())
|
||||
proxyServer.listen(port, () => resolve('mockResolve'))
|
||||
})
|
||||
proxyServer.on('connect', req => {
|
||||
proxyConnects.push(req.url ?? '')
|
||||
|
@ -33,7 +33,7 @@ describe('@actions/github', () => {
|
|||
afterAll(async () => {
|
||||
// Stop proxy server
|
||||
await new Promise(resolve => {
|
||||
proxyServer.once('close', () => resolve())
|
||||
proxyServer.once('close', () => resolve('closed'))
|
||||
proxyServer.close()
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue