diff options
| author | Joe Mou <dev@mou.fo> | 2026-03-14 00:35:48 -0400 |
|---|---|---|
| committer | Joe Mou <dev@mou.fo> | 2026-03-14 00:36:16 -0400 |
| commit | 4662a229e06468a0805a18c6175bc0fd3a4ea985 (patch) | |
| tree | d32f85f7f0baaa4a22713ca3ec7ff89da53fe73e /cgithub/src/scraper.test.ts | |
| parent | 148272c64a97259ac874c4d8af1a93f197299012 (diff) | |
Fix tree overviewHtml: use tree.readme instead of overview.overviewFiles
Diffstat (limited to 'cgithub/src/scraper.test.ts')
| -rw-r--r-- | cgithub/src/scraper.test.ts | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/cgithub/src/scraper.test.ts b/cgithub/src/scraper.test.ts index ad3ed46..1abab29 100644 --- a/cgithub/src/scraper.test.ts +++ b/cgithub/src/scraper.test.ts @@ -38,30 +38,27 @@ describe("GitHub scraper", () => { }); it("should fetch tree", async () => { - const data = await getGitHubTree("actions", "deploy-pages", "main", "src"); + const data = await getGitHubTree("github", "rally", "main", "lib"); - assert.strictEqual(data.repo.owner, "actions"); - assert.strictEqual(data.repo.name, "deploy-pages"); + assert.strictEqual(data.repo.owner, "github"); + assert.strictEqual(data.repo.name, "rally"); assert.strictEqual(data.branch, "main"); - assert.strictEqual(data.path, "src"); + assert.strictEqual(data.path, "lib"); assert.deepStrictEqual(data.items, [ { - name: "__tests__", - path: "src/__tests__", - contentType: "directory", - }, - { - name: "internal", - path: "src/internal", - contentType: "directory", + name: "README.md", + path: "lib/README.md", + contentType: "file", }, { - name: "index.js", - path: "src/index.js", + name: "RallyValidate.js", + path: "lib/RallyValidate.js", contentType: "file", }, ]); + + assert.ok(Object.keys(data.overviewHtml ?? {}).includes("README.md")); }); it("should fetch text blob", async () => { |
