summaryrefslogtreecommitdiff
path: root/cgithub/src/scraper.test.ts
diff options
context:
space:
mode:
authorJoe Mou <dev@mou.fo>2026-02-11 02:09:26 -0500
committerJoe Mou <dev@mou.fo>2026-02-21 16:30:23 +1100
commit371f558ed70d29f63e9fbee48c8db7ffab2f7cba (patch)
treedf533f5497b33cadc8732efb315da4b28d1cabe8 /cgithub/src/scraper.test.ts
parent1435dea09882f110448b034d7cffa32d03e19a8f (diff)
Add single release detail pages and refactor templates
Refactored releases display into reusable partial template (_release.eta) and added support for viewing individual releases at /:owner/:repo/releases/tag/:tag with navigation back to all releases. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Diffstat (limited to 'cgithub/src/scraper.test.ts')
-rw-r--r--cgithub/src/scraper.test.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/cgithub/src/scraper.test.ts b/cgithub/src/scraper.test.ts
index 33f00f1..0b91b6a 100644
--- a/cgithub/src/scraper.test.ts
+++ b/cgithub/src/scraper.test.ts
@@ -4,6 +4,7 @@ import {
getGitHubBlob,
getGitHubCommits,
getGitHubIssues,
+ getGitHubRelease,
getGitHubReleases,
getGitHubRepo,
getGitHubTree,
@@ -174,6 +175,18 @@ describe("GitHub scraper", () => {
assert.ok(firstRelease.publishedAt.length > 0);
assert.ok(firstRelease.bodyHtml.length > 0);
});
+
+ it("should fetch single release", async () => {
+ const data = await getGitHubRelease("actions", "deploy-pages", "v4.0.5");
+
+ assert.strictEqual(data.repo.owner, "actions");
+ assert.strictEqual(data.repo.name, "deploy-pages");
+
+ assert.ok(data.release.tagName.length > 0);
+ assert.ok(data.release.title.length > 0);
+ assert.ok(data.release.publishedAt.length > 0);
+ assert.ok(data.release.bodyHtml.length > 0);
+ });
});
describe("rich file types", () => {