mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-04-05 07:53:15 +08:00
pass in http client to constructor
This commit is contained in:
@@ -11,11 +11,11 @@ describe("artifact-http-client", () => {
|
||||
jest.spyOn(core, "debug").mockImplementation(() => {})
|
||||
jest.spyOn(core, "info").mockImplementation(() => {})
|
||||
jest.spyOn(core, "warning").mockImplementation(() => {})
|
||||
jest.spyOn(config, "getResultsServiceUrl").mockReturnValue("http://localhost:8080")
|
||||
jest.spyOn(config, "getRuntimeToken").mockReturnValue("token")
|
||||
})
|
||||
|
||||
it("should successfully create a client", () => {
|
||||
jest.spyOn(config, "getResultsServiceUrl").mockReturnValue("http://localhost:8080")
|
||||
jest.spyOn(config, "getRuntimeToken").mockReturnValue("token")
|
||||
const client = createArtifactTwirpClient("upload")
|
||||
expect(client).toBeDefined()
|
||||
})
|
||||
@@ -27,7 +27,8 @@ describe("artifact-http-client", () => {
|
||||
workflowRunBackendId: "1234",
|
||||
workflowJobRunBackendId: "5678",
|
||||
name: "artifact",
|
||||
version: 4}
|
||||
version: 4
|
||||
}
|
||||
)
|
||||
expect(artifact).toBeDefined()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user