From 81d5e48db0a475d61abc3e79f8640b26f515ebcb Mon Sep 17 00:00:00 2001 From: bethanyj28 Date: Thu, 22 Feb 2024 17:51:15 -0500 Subject: [PATCH] update tests --- packages/artifact/__tests__/download-artifact.test.ts | 4 ++-- packages/artifact/src/internal/download/download-artifact.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/artifact/__tests__/download-artifact.test.ts b/packages/artifact/__tests__/download-artifact.test.ts index 7d8fead5..574f6b15 100644 --- a/packages/artifact/__tests__/download-artifact.test.ts +++ b/packages/artifact/__tests__/download-artifact.test.ts @@ -13,7 +13,7 @@ import { streamExtractExternal } from '../src/internal/download/download-artifact' import {getUserAgentString} from '../src/internal/shared/user-agent' -//import {noopLogs} from './common' +import {noopLogs} from './common' import * as config from '../src/internal/shared/config' import {ArtifactServiceClientJSON} from '../src/generated' import * as util from '../src/internal/shared/util' @@ -89,7 +89,7 @@ const expectExtractedArchive = async (dir: string): Promise => { } const setup = async (): Promise => { - //noopLogs() + noopLogs() await fs.promises.mkdir(testDir, {recursive: true}) await createTestArchive() diff --git a/packages/artifact/src/internal/download/download-artifact.ts b/packages/artifact/src/internal/download/download-artifact.ts index 995dbafb..a06dcf28 100644 --- a/packages/artifact/src/internal/download/download-artifact.ts +++ b/packages/artifact/src/internal/download/download-artifact.ts @@ -97,7 +97,7 @@ export async function streamExtractExternal( core.debug(`Extracting artifact entry: ${fullPath}`) entry.pipe(createWriteStream(fullPath)) }) - .on('close', () => { + .on('end', () => { clearTimeout(timer) resolve() })