aboutsummaryrefslogtreecommitdiff
path: root/src/scraper.test.ts
diff options
context:
space:
mode:
authorJoe Mou <dev@mou.fo>2026-05-27 14:02:36 -0400
committerJoe Mou <dev@mou.fo>2026-05-27 23:38:34 -0400
commit15206d169c89b8a337b3f929a23ff3f71cdd5a89 (patch)
treea6abab640b3b5e7e18edf2e70714261f8cf68fe0 /src/scraper.test.ts
parent96396c4ed853652ea311d006b4ebe6af15b40684 (diff)
Pull request index
Diffstat (limited to 'src/scraper.test.ts')
-rw-r--r--src/scraper.test.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/scraper.test.ts b/src/scraper.test.ts
index 236b0f5..a4b834e 100644
--- a/src/scraper.test.ts
+++ b/src/scraper.test.ts
@@ -4,6 +4,7 @@ import {
getGitHubBlob,
getGitHubCommits,
getGitHubIssues,
+ getGitHubPulls,
getGitHubRelease,
getGitHubReleases,
getGitHubRepo,
@@ -150,6 +151,16 @@ describe("GitHub scraper", () => {
assert.ok(data.issues.every((issue) => issue.title !== ""));
});
+ it("should fetch pull requests", async () => {
+ const data = await getGitHubPulls("actions", "deploy-pages", { q: "state:closed" });
+
+ assert.strictEqual(data.repo.owner, "actions");
+ assert.strictEqual(data.repo.name, "deploy-pages");
+ const pr411 = data.pulls.find((pull) => pull.number === 411);
+ assert.ok(pr411);
+ assert.strictEqual(pr411.title, "update node version");
+ });
+
it("should fetch commits", async () => {
const data = await getGitHubCommits("actions", "deploy-pages", "main", "");