1
0
Fork 0

push null at end of mocked message

pull/1602/head
Rob Herley 2023-12-11 13:41:11 -05:00
parent 4c531c013a
commit 09249a72d7
No known key found for this signature in database
GPG Key ID: D1602042C3543B06
1 changed files with 2 additions and 0 deletions

View File

@ -104,6 +104,7 @@ const mockGetArtifactSuccess = jest.fn(() => {
const message = new http.IncomingMessage(new net.Socket()) const message = new http.IncomingMessage(new net.Socket())
message.statusCode = 200 message.statusCode = 200
message.push(fs.readFileSync(fixtures.exampleArtifact.path)) message.push(fs.readFileSync(fixtures.exampleArtifact.path))
message.push(null)
return { return {
message message
} }
@ -113,6 +114,7 @@ const mockGetArtifactFailure = jest.fn(() => {
const message = new http.IncomingMessage(new net.Socket()) const message = new http.IncomingMessage(new net.Socket())
message.statusCode = 500 message.statusCode = 500
message.push('Internal Server Error') message.push('Internal Server Error')
message.push(null)
return { return {
message message
} }