diff options
| author | Lee James <[email protected]> | 2025-08-07 12:00:46 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-08-07 16:00:46 +0000 |
| commit | 8d848dca4a52d169b3dfea2f66e7e5f69ee5e45c (patch) | |
| tree | bbb82f3a1e8024e6c116c1ca3b5a5313fa31ab02 /packages/cli/src/ui/commands/setupGithubCommand.test.ts | |
| parent | 6ae75c9f32a968efa50857a8f24b958a58a84fd6 (diff) | |
feat: open repo secrets page in addition to README (#5684)
Diffstat (limited to 'packages/cli/src/ui/commands/setupGithubCommand.test.ts')
| -rw-r--r-- | packages/cli/src/ui/commands/setupGithubCommand.test.ts | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/packages/cli/src/ui/commands/setupGithubCommand.test.ts b/packages/cli/src/ui/commands/setupGithubCommand.test.ts index 6417c60a..be0a657f 100644 --- a/packages/cli/src/ui/commands/setupGithubCommand.test.ts +++ b/packages/cli/src/ui/commands/setupGithubCommand.test.ts @@ -18,6 +18,7 @@ vi.mock('../../utils/gitUtils.js', () => ({ isGitHubRepository: vi.fn(), getGitRepoRoot: vi.fn(), getLatestGitHubRelease: vi.fn(), + getGitHubRepoInfo: vi.fn(), })); describe('setupGithubCommand', async () => { @@ -30,7 +31,9 @@ describe('setupGithubCommand', async () => { }); it('returns a tool action to download github workflows and handles paths', async () => { - const fakeRepoRoot = '/github.com/fake/repo/root'; + const fakeRepoOwner = 'fake'; + const fakeRepoName = 'repo'; + const fakeRepoRoot = `/github.com/${fakeRepoOwner}/${fakeRepoName}/root`; const fakeReleaseVersion = 'v1.2.3'; vi.mocked(gitUtils.isGitHubRepository).mockReturnValueOnce(true); @@ -38,6 +41,10 @@ describe('setupGithubCommand', async () => { vi.mocked(gitUtils.getLatestGitHubRelease).mockResolvedValueOnce( fakeReleaseVersion, ); + vi.mocked(gitUtils.getGitHubRepoInfo).mockReturnValue({ + owner: fakeRepoOwner, + repo: fakeRepoName, + }); const result = (await setupGithubCommand.action?.( {} as CommandContext, |
