MCPcopy Index your code
hub / github.com/actions/github-script / mockGetOctokit

Function mockGetOctokit

__test__/getoctokit-integration.test.ts:10–21  ·  view source on GitHub ↗
(token: string, options?: any)

Source from the content-addressed store, hash-verified

8// script context wiring — getOctokit is passed through and
9// callable from user scripts.
10function mockGetOctokit(token: string, options?: any) {
11 return {
12 _token: token,
13 _options: options,
14 rest: {
15 issues: {get: async () => ({data: {id: 1}})},
16 pulls: {get: async () => ({data: {id: 2}})}
17 },
18 graphql: async () => ({}),
19 request: async () => ({})
20 }
21}
22
23describe('getOctokit integration via callAsyncFunction', () => {
24 test('getOctokit creates a functional client in script scope', async () => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected