|
1 | 1 | import { jest } from '@jest/globals' |
2 | | -import { Endpoints } from '@octokit/types' |
3 | 2 |
|
4 | 3 | export const graphql = jest.fn() |
5 | 4 | export const paginate = jest.fn() |
6 | 5 | export const rest = { |
7 | 6 | issues: { |
8 | 7 | addLabels: jest.fn(), |
9 | 8 | createComment: jest.fn(), |
10 | | - get: jest.fn< |
11 | | - () => Promise< |
12 | | - Endpoints['GET /repos/{owner}/{repo}/issues/{issue_number}']['response'] |
13 | | - > |
14 | | - >(), |
| 9 | + get: jest.fn(), |
15 | 10 | listComments: jest.fn(), |
16 | 11 | removeLabel: jest.fn(), |
17 | 12 | update: jest.fn() |
18 | 13 | }, |
19 | 14 | orgs: { |
20 | 15 | checkMembershipForUser: jest.fn(), |
21 | | - createOrUpdateCustomPropertiesValuesForRepos: jest.fn() |
| 16 | + createOrUpdateCustomPropertiesValuesForRepos: jest.fn(), |
| 17 | + getMembershipForUser: jest.fn(), |
| 18 | + removeMember: jest.fn() |
22 | 19 | }, |
23 | 20 | pulls: { |
24 | | - create: |
25 | | - jest.fn< |
26 | | - () => Promise<Endpoints['POST /repos/{owner}/{repo}/pulls']['response']> |
27 | | - >(), |
| 21 | + create: jest.fn(), |
28 | 22 | listFiles: jest.fn() |
29 | 23 | }, |
30 | 24 | repos: { |
31 | 25 | createOrUpdateEnvironment: jest.fn(), |
32 | 26 | createPagesSite: jest.fn(), |
33 | 27 | createUsingTemplate: jest.fn(), |
34 | | - get: jest.fn< |
35 | | - () => Promise<Endpoints['GET /repos/{owner}/{repo}']['response']> |
36 | | - >(), |
| 28 | + delete: jest.fn(), |
| 29 | + get: jest.fn(), |
37 | 30 | getContent: jest.fn(), |
38 | 31 | update: jest.fn() |
39 | 32 | }, |
40 | 33 | teams: { |
41 | 34 | addOrUpdateMembershipForUserInOrg: jest.fn(), |
42 | 35 | addOrUpdateRepoPermissionsInOrg: jest.fn(), |
43 | 36 | create: jest.fn(), |
| 37 | + deleteInOrg: jest.fn(), |
| 38 | + getByName: jest.fn(), |
| 39 | + listMembersInOrg: jest.fn(), |
44 | 40 | removeMembershipForUserInOrg: jest.fn() |
45 | 41 | } |
46 | 42 | } |
0 commit comments