| 1234567891011121314151617181920 |
- import { expect, test } from "vitest";
- import { parseGithubUrl } from "../../src/utils/parseGithubUrl";
- 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([]);
- });
|