add tests for download artifact

This commit is contained in:
Rob Herley
2023-08-23 23:18:03 -04:00
parent 62f943c0cc
commit 67c3b7a45c
2 changed files with 280 additions and 6 deletions

View File

@@ -39,12 +39,7 @@ async function streamExtract(url: string, directory: string): Promise<void> {
)
}
return new Promise((resolve, reject) => {
response.message
.pipe(unzipper.Extract({path: directory}))
.on('finish', resolve)
.on('error', reject)
})
return response.message.pipe(unzipper.Extract({path: directory})).promise()
}
export async function downloadArtifact(