Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
yacaovsnc committed Dec 3, 2020
1 parent 6b83f05 commit b55731c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/artifact/__tests__/download.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,10 +293,10 @@ describe('Download Tests', () => {
}

function setupThrowWhenReadingStream(): void {
const spyInstance = jest
jest
.spyOn(DownloadHttpClient.prototype, 'pipeResponseToFile')
.mockImplementationOnce(async () => {
return new Promise<void>(resolve => {
return new Promise<void>(() => {
throw new Error(
'simulate GZip reading truncated buffer and throw Z_BUF_ERROR'
)
Expand Down
4 changes: 3 additions & 1 deletion packages/artifact/src/internal/download-http-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,9 @@ export class DownloadHttpClient {
return parseInt(expected) === received
}

const resetDestinationStream = async (downloadPath: string) => {
const resetDestinationStream = async (
downloadPath: string
): Promise<void> => {
await rmFile(downloadPath)
destinationStream = fs.createWriteStream(downloadPath)
}
Expand Down

0 comments on commit b55731c

Please sign in to comment.