3
0
Fork 0
mirror of https://gitea.com/docker/metadata-action.git synced 2024-11-22 12:09:32 +01:00
docker-metadata/__tests__/github.test.ts
CrazyMax c15e83fc17
Update dev deps
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-07-06 20:01:00 +02:00

14 lines
484 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();
});
});