From 09249a72d7b7b84d4768e53ee06a10dd4c0abf1d Mon Sep 17 00:00:00 2001 From: Rob Herley Date: Mon, 11 Dec 2023 13:41:11 -0500 Subject: [PATCH] push null at end of mocked message --- packages/artifact/__tests__/download-artifact.test.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/artifact/__tests__/download-artifact.test.ts b/packages/artifact/__tests__/download-artifact.test.ts index 247a5e42..815a760c 100644 --- a/packages/artifact/__tests__/download-artifact.test.ts +++ b/packages/artifact/__tests__/download-artifact.test.ts @@ -104,6 +104,7 @@ const mockGetArtifactSuccess = jest.fn(() => { const message = new http.IncomingMessage(new net.Socket()) message.statusCode = 200 message.push(fs.readFileSync(fixtures.exampleArtifact.path)) + message.push(null) return { message } @@ -113,6 +114,7 @@ const mockGetArtifactFailure = jest.fn(() => { const message = new http.IncomingMessage(new net.Socket()) message.statusCode = 500 message.push('Internal Server Error') + message.push(null) return { message }