Files
labeler/__mocks__/@actions/github.ts
2021-06-04 14:46:22 -04:00

33 lines
537 B
TypeScript

export const context = {
payload: {
pull_request: {
number: 123,
},
},
repo: {
owner: "monalisa",
repo: "helloworld",
},
};
const mockApi = {
issues: {
addLabels: jest.fn(),
removeLabel: jest.fn(),
},
paginate: jest.fn(),
pulls: {
get: jest.fn().mockResolvedValue({}),
listFiles: {
endpoint: {
merge: jest.fn().mockReturnValue({}),
},
},
},
repos: {
getContents: jest.fn(),
},
};
export const GitHub = jest.fn().mockImplementation(() => mockApi);