From b55731c11b1f88efc315881e443661a3129f89b4 Mon Sep 17 00:00:00 2001 From: Yang Cao Date: Thu, 3 Dec 2020 10:33:10 -0500 Subject: [PATCH] Fix styling --- packages/artifact/__tests__/download.test.ts | 4 ++-- packages/artifact/src/internal/download-http-client.ts | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/artifact/__tests__/download.test.ts b/packages/artifact/__tests__/download.test.ts index 518cfc59..b940fdec 100644 --- a/packages/artifact/__tests__/download.test.ts +++ b/packages/artifact/__tests__/download.test.ts @@ -293,10 +293,10 @@ describe('Download Tests', () => { } function setupThrowWhenReadingStream(): void { - const spyInstance = jest + jest .spyOn(DownloadHttpClient.prototype, 'pipeResponseToFile') .mockImplementationOnce(async () => { - return new Promise(resolve => { + return new Promise(() => { throw new Error( 'simulate GZip reading truncated buffer and throw Z_BUF_ERROR' ) diff --git a/packages/artifact/src/internal/download-http-client.ts b/packages/artifact/src/internal/download-http-client.ts index 2110b6a6..7caef993 100644 --- a/packages/artifact/src/internal/download-http-client.ts +++ b/packages/artifact/src/internal/download-http-client.ts @@ -219,7 +219,9 @@ export class DownloadHttpClient { return parseInt(expected) === received } - const resetDestinationStream = async (downloadPath: string) => { + const resetDestinationStream = async ( + downloadPath: string + ): Promise => { await rmFile(downloadPath) destinationStream = fs.createWriteStream(downloadPath) }