mirror of
https://code.forgejo.org/docker/actions-toolkit.git
synced 2025-06-24 22:58:21 -04:00
carries most of the logic used across our actions Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
14 lines
512 B
TypeScript
14 lines
512 B
TypeScript
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();
|
|
});
|
|
});
|