import * as path from 'path'; import * as github from '../src/github'; jest.spyOn(github, 'repo').mockImplementation((): Promise => { return >require(path.join(__dirname, 'fixtures', 'repo.json')); }); describe('repo', () => { it('returns GitHub repository', async () => { const repo = await github.repo(process.env.GITHUB_TOKEN || ''); expect(repo.name).not.toBeNull(); }); });