mirror of https://github.com/actions/toolkit
Fix styling
parent
6b83f0554a
commit
b55731c11b
|
@ -293,10 +293,10 @@ describe('Download Tests', () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
function setupThrowWhenReadingStream(): void {
|
function setupThrowWhenReadingStream(): void {
|
||||||
const spyInstance = jest
|
jest
|
||||||
.spyOn(DownloadHttpClient.prototype, 'pipeResponseToFile')
|
.spyOn(DownloadHttpClient.prototype, 'pipeResponseToFile')
|
||||||
.mockImplementationOnce(async () => {
|
.mockImplementationOnce(async () => {
|
||||||
return new Promise<void>(resolve => {
|
return new Promise<void>(() => {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
'simulate GZip reading truncated buffer and throw Z_BUF_ERROR'
|
'simulate GZip reading truncated buffer and throw Z_BUF_ERROR'
|
||||||
)
|
)
|
||||||
|
|
|
@ -219,7 +219,9 @@ export class DownloadHttpClient {
|
||||||
return parseInt(expected) === received
|
return parseInt(expected) === received
|
||||||
}
|
}
|
||||||
|
|
||||||
const resetDestinationStream = async (downloadPath: string) => {
|
const resetDestinationStream = async (
|
||||||
|
downloadPath: string
|
||||||
|
): Promise<void> => {
|
||||||
await rmFile(downloadPath)
|
await rmFile(downloadPath)
|
||||||
destinationStream = fs.createWriteStream(downloadPath)
|
destinationStream = fs.createWriteStream(downloadPath)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue