mirror of
https://github.com/docker/metadata-action.git
synced 2024-12-22 20:35:39 +00:00
28d7c8bbcd
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
17 lines
492 B
TypeScript
17 lines
492 B
TypeScript
import * as path from 'path';
|
|
import * as github from '../src/github';
|
|
|
|
jest.spyOn(github, 'repo').mockImplementation(
|
|
(): Promise<github.ReposGetResponseData> => {
|
|
return <Promise<github.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();
|
|
});
|
|
});
|