zzz / frontend /__tests__ /utils /parse-github-url.test.ts
ar08's picture
Upload 1040 files
246d201 verified
raw
history blame
581 Bytes
import { expect, test } from "vitest";
import { parseGithubUrl } from "../../src/utils/parse-github-url";
test("parseGithubUrl", () => {
expect(
parseGithubUrl("https://github.com/alexreardon/tiny-invariant"),
).toEqual(["alexreardon", "tiny-invariant"]);
expect(parseGithubUrl("https://github.com/All-Hands-AI/OpenHands")).toEqual([
"All-Hands-AI",
"OpenHands",
]);
expect(parseGithubUrl("https://github.com/All-Hands-AI/")).toEqual([
"All-Hands-AI",
"",
]);
expect(parseGithubUrl("https://github.com/")).toEqual([]);
});