mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-04-07 12:53:16 +08:00
push null at end of mocked message
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user