* Mocks a repository branch list API request. * https://docs.github.com/en/rest/reference/repos#list-branches.
(username: string, result: boolean)
| 77 | * https://docs.github.com/en/rest/reference/repos#list-branches. |
| 78 | */ |
| 79 | function interceptOrgsMembershipRequest(username: string, result: boolean) { |
| 80 | const mock = nock(getOrgsApiRequestUrl()); |
| 81 | const responseCode = result ? 204 : 302; |
| 82 | mock.get(`/googlers/members/${username}`).reply(responseCode); |
| 83 | } |
| 84 | |
| 85 | function setupFakeSyncConfig(config: GoogleSyncConfig): string { |
| 86 | const configFileName = 'sync-test-conf.json'; |
no test coverage detected