Skip to content

Commit 7a88786

Browse files
committed
Fix test coverage
1 parent 5842c6f commit 7a88786

30 files changed

+2604
-629
lines changed

.github/workflows/process-issue.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,5 @@ jobs:
3131
id: process
3232
uses: githubschool/gh-github-intermediate-issueops@main
3333
with:
34-
action: create
3534
github_token: ${{ steps.token.outputs.token }}
3635
workspace: ${{ github.workspace }}

__fixtures__/github.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ export const context = {
99
issue: {
1010
body: '### Customer Name\n\nNick Testing Industries\n\n### Customer Abbreviation\n\nNA1\n\n### Start Date\n\n2024-10-17\n\n### End Date\n\n2024-10-20\n\n### Administrators\n\nncalteen,[email protected]\n\n### Attendees\nncalteen-testuser,[email protected]',
1111
number: 1
12+
},
13+
comment: {
14+
body: ''
1215
}
1316
}
1417
}

__fixtures__/octokit.ts

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,42 @@
11
import { jest } from '@jest/globals'
2-
import { Endpoints } from '@octokit/types'
32

43
export const graphql = jest.fn()
54
export const paginate = jest.fn()
65
export const rest = {
76
issues: {
87
addLabels: jest.fn(),
98
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(),
1510
listComments: jest.fn(),
1611
removeLabel: jest.fn(),
1712
update: jest.fn()
1813
},
1914
orgs: {
2015
checkMembershipForUser: jest.fn(),
21-
createOrUpdateCustomPropertiesValuesForRepos: jest.fn()
16+
createOrUpdateCustomPropertiesValuesForRepos: jest.fn(),
17+
getMembershipForUser: jest.fn(),
18+
removeMember: jest.fn()
2219
},
2320
pulls: {
24-
create:
25-
jest.fn<
26-
() => Promise<Endpoints['POST /repos/{owner}/{repo}/pulls']['response']>
27-
>(),
21+
create: jest.fn(),
2822
listFiles: jest.fn()
2923
},
3024
repos: {
3125
createOrUpdateEnvironment: jest.fn(),
3226
createPagesSite: jest.fn(),
3327
createUsingTemplate: jest.fn(),
34-
get: jest.fn<
35-
() => Promise<Endpoints['GET /repos/{owner}/{repo}']['response']>
36-
>(),
28+
delete: jest.fn(),
29+
get: jest.fn(),
3730
getContent: jest.fn(),
3831
update: jest.fn()
3932
},
4033
teams: {
4134
addOrUpdateMembershipForUserInOrg: jest.fn(),
4235
addOrUpdateRepoPermissionsInOrg: jest.fn(),
4336
create: jest.fn(),
37+
deleteInOrg: jest.fn(),
38+
getByName: jest.fn(),
39+
listMembersInOrg: jest.fn(),
4440
removeMembershipForUserInOrg: jest.fn()
4541
}
4642
}

0 commit comments

Comments
 (0)