adding updated lints and fixes

This commit is contained in:
Vallie Joseph 2023-07-28 14:12:15 +00:00
parent ba96334e72
commit 20e1b242c8
6 changed files with 48 additions and 50 deletions

View File

@ -239,7 +239,7 @@ describe('Download Tests', () => {
*/ */
async function emptyMockReadBody(): Promise<string> { async function emptyMockReadBody(): Promise<string> {
return new Promise(resolve => { return new Promise(resolve => {
resolve() resolve('mockResolve')
}) })
} }

View File

@ -65,7 +65,7 @@ beforeAll(async () => {
*/ */
async function emptyMockReadBody(): Promise<string> { async function emptyMockReadBody(): Promise<string> {
return new Promise(resolve => { return new Promise(resolve => {
resolve() resolve('mockResolved')
}) })
} }

View File

@ -429,7 +429,7 @@ describe('Upload Tests', () => {
*/ */
async function emptyMockReadBody(): Promise<string> { async function emptyMockReadBody(): Promise<string> {
return new Promise(resolve => { return new Promise(resolve => {
resolve() resolve('mockResolve')
}) })
} }
@ -461,8 +461,7 @@ describe('Upload Tests', () => {
fileContainerResourceUrl: `${getRuntimeUrl()}_apis/resources/Containers/13`, fileContainerResourceUrl: `${getRuntimeUrl()}_apis/resources/Containers/13`,
type: 'actions_storage', type: 'actions_storage',
name: inputData.Name, name: inputData.Name,
url: `${getRuntimeUrl()}_apis/pipelines/1/runs/1/artifacts?artifactName=${ url: `${getRuntimeUrl()}_apis/pipelines/1/runs/1/artifacts?artifactName=${inputData.Name
inputData.Name
}` }`
} }
const returnData: string = JSON.stringify(response, null, 2) const returnData: string = JSON.stringify(response, null, 2)

View File

@ -113,8 +113,7 @@ export class DownloadHttpClient {
if (core.isDebug()) { if (core.isDebug()) {
core.debug( core.debug(
`File: ${++downloadedFiles}/${downloadItems.length}. ${ `File: ${++downloadedFiles}/${downloadItems.length}. ${currentFileToDownload.targetPath
currentFileToDownload.targetPath
} took ${(performance.now() - startTime).toFixed( } took ${(performance.now() - startTime).toFixed(
3 3
)} milliseconds to finish downloading` )} milliseconds to finish downloading`
@ -328,7 +327,7 @@ export class DownloadHttpClient {
}) })
.pipe(destinationStream) .pipe(destinationStream)
.on('close', () => { .on('close', () => {
resolve() resolve('closed')
}) })
.on('error', error => { .on('error', error => {
core.info( core.info(
@ -347,7 +346,7 @@ export class DownloadHttpClient {
}) })
.pipe(destinationStream) .pipe(destinationStream)
.on('close', () => { .on('close', () => {
resolve() resolve('closed')
}) })
.on('error', error => { .on('error', error => {
core.info( core.info(

View File

@ -19,7 +19,7 @@ describe('@actions/github', () => {
proxyServer = proxy() proxyServer = proxy()
await new Promise(resolve => { await new Promise(resolve => {
const port = Number(proxyUrl.split(':')[2]) const port = Number(proxyUrl.split(':')[2])
proxyServer.listen(port, () => resolve()) proxyServer.listen(port, () => resolve('mockResolve'))
}) })
proxyServer.on('connect', req => { proxyServer.on('connect', req => {
proxyConnects.push(req.url ?? '') proxyConnects.push(req.url ?? '')
@ -33,7 +33,7 @@ describe('@actions/github', () => {
afterAll(async () => { afterAll(async () => {
// Stop proxy server // Stop proxy server
await new Promise(resolve => { await new Promise(resolve => {
proxyServer.once('close', () => resolve()) proxyServer.once('close', () => resolve('closed'))
proxyServer.close() proxyServer.close()
}) })