diff --git a/__tests__/main.test.ts b/__tests__/main.test.ts index 92e7c18..3840165 100644 --- a/__tests__/main.test.ts +++ b/__tests__/main.test.ts @@ -1,6 +1,25 @@ +import * as github from '@actions/github' import * as main from '../src/main' // Frankly, tests would be entirely useless unless we can mock GitHub somehow. describe('Upload Release Action', () => { - it('', async () => {}) + let spyGetOctokit: jest.SpyInstance + let mockOctokit: any + + beforeEach(() => { + mockOctokit = { + repos: { + createRelease: jest.fn(async () => ({ + data: { + id: 'lalala', + upload_url: 'oaoa' + } + })) + } + } + // spyGetOctokit = jest.spyOn(github, "getOctokit").mockImplementation(() => mockOctokit + // jest.spyOn(github, "context", "get").mockImplementation(() => "testtest"); + }) + + it('pls write actual test', async () => {}) })