MCPcopy Create free account
hub / github.com/github/docs / gotMock

Function gotMock

tests/helpers/action-mocks.js:35–46  ·  view source on GitHub ↗
({ status } = {})

Source from the content-addressed store, hash-verified

33}
34
35export function gotMock({ status } = {}) {
36 return jest.fn(async () => {
37 if (status < 200 || status >= 400) {
38 throw new Error({
39 status,
40 })
41 }
42 return new Error({
43 status,
44 })
45 })
46}
47
48export function uploadArtifactMock() {
49 return jest.fn()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected