Skip to content

armgit / Ix

Public Imported from GitHub
0

Understand any codebase instantly. System intelligence for codebases, built for humans and AI.

test(github): keep the parseGitHubRepo tests beside the pagination ones

KageBinary50da15c19411
diff --git a/ix-cli/src/cli/__tests__/github-fetch.test.ts b/ix-cli/src/cli/__tests__/github-fetch.test.ts
index 6ef269ea..68aa02bc 100644
--- a/ix-cli/src/cli/__tests__/github-fetch.test.ts
+++ b/ix-cli/src/cli/__tests__/github-fetch.test.ts
@@ -4,6 +4,21 @@ import { describe, expect, it } from "vitest";
import { ghFetchList } from "../github/fetch.js";
+describe("parseGitHubRepo", () => {
+ it("parses owner/repo format", async () => {
+ const { parseGitHubRepo } = await import("../github/fetch.js");
+ expect(parseGitHubRepo("ix-infrastructure/IX-Memory")).toEqual({
+ owner: "ix-infrastructure",
+ repo: "IX-Memory",
+ });
+ });
+
+ it("throws on invalid format", async () => {
+ const { parseGitHubRepo } = await import("../github/fetch.js");
+ expect(() => parseGitHubRepo("invalid")).toThrow();
+ });
+});
+
describe("ghFetchList", () => {
/** A list endpoint holding `total` items, recording the URLs it was asked for. */
const endpoint = (total: number) => {