This commit is contained in:
Huakun Shen 2025-03-24 01:45:00 -04:00
parent 7eca29a600
commit d8cf220b2c
No known key found for this signature in database

View File

@ -1,5 +1,5 @@
import { expect, test } from "bun:test" import { expect, test } from "bun:test"
import { getGitHubRepoNodeId, parseGitHubRepoFromUri } from "../github" import { getGitHubRepoMetadata, parseGitHubRepoFromUri } from "../github"
test("parse github repo from uri", () => { test("parse github repo from uri", () => {
expect(parseGitHubRepoFromUri("https://github.com/kunkunsh/kunkun-ext-ossinsight")).toEqual({ expect(parseGitHubRepoFromUri("https://github.com/kunkunsh/kunkun-ext-ossinsight")).toEqual({
@ -9,7 +9,7 @@ test("parse github repo from uri", () => {
expect(() => parseGitHubRepoFromUri("invalid-uri")).toThrow("Invalid GitHub repository URI") expect(() => parseGitHubRepoFromUri("invalid-uri")).toThrow("Invalid GitHub repository URI")
}) })
test("get github repo id", async () => { test("get github repo metadata", async () => {
const id = await getGitHubRepoNodeId("kunkunsh", "kunkun") const metadata = await getGitHubRepoMetadata("kunkunsh", "kunkun-ext-ossinsight")
expect(id).toBeDefined() expect(metadata).toBeDefined()
}) })