mirror of
https://code.forgejo.org/docker/metadata-action.git
synced 2025-06-27 21:05:53 +00:00
Initial commit
This commit is contained in:
commit
90ec551e12
42 changed files with 14168 additions and 0 deletions
17
__tests__/github.test.ts
Normal file
17
__tests__/github.test.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
import * as path from 'path';
|
||||
import * as github from '../src/github';
|
||||
import {ReposGetResponseData} from '@octokit/types';
|
||||
|
||||
jest.spyOn(github, 'repo').mockImplementation(
|
||||
(): Promise<ReposGetResponseData> => {
|
||||
return <Promise<ReposGetResponseData>>require(path.join(__dirname, 'fixtures', 'repo.json'));
|
||||
}
|
||||
);
|
||||
|
||||
describe('repo', () => {
|
||||
it('returns GitHub repository', async () => {
|
||||
const repo = await github.repo(process.env.GITHUB_TOKEN || '');
|
||||
console.log(repo);
|
||||
expect(repo.name).not.toBeNull();
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue