import { Octokit } from 'octokit'; import { BaseOctokitHelper } from '../base'; describe('BaseOctokitHelper', () => { test("Creates its own Octokit instance if one isn't provided", () => { const helper = new BaseOctokitHelper(); expect(helper.getOctokit()).toBeInstanceOf(Octokit); }); test('Uses the provided Octokit instance if one is provided', () => { const octokit = new Octokit({ auth: process.env.GITHUB_TOKEN }); const helper = new BaseOctokitHelper(octokit); expect(helper.getOctokit()).toBe(octokit); }); });