mirror of
https://code.forgejo.org/docker/actions-toolkit.git
synced 2025-06-25 23:28:21 -04:00
initial implementation
carries most of the logic used across our actions Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
3b6c627995
commit
70326fd842
31 changed files with 5703 additions and 0 deletions
14
__tests__/github.test.ts
Normal file
14
__tests__/github.test.ts
Normal file
|
@ -0,0 +1,14 @@
|
|||
import {describe, expect, jest, it} from '@jest/globals';
|
||||
import * as github from '../src/github';
|
||||
|
||||
import * as repoFixture from './fixtures/repo.json';
|
||||
jest.spyOn(github, 'repo').mockImplementation((): Promise<github.ReposGetResponseData> => {
|
||||
return <Promise<github.ReposGetResponseData>>(repoFixture as unknown);
|
||||
});
|
||||
|
||||
describe('repo', () => {
|
||||
it('returns GitHub repository', async () => {
|
||||
const repo = await github.repo(process.env.GITHUB_TOKEN || '');
|
||||
expect(repo.name).not.toBeNull();
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue