diff options
Diffstat (limited to 'cgithub/src/scraper.test.ts')
| -rw-r--r-- | cgithub/src/scraper.test.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/cgithub/src/scraper.test.ts b/cgithub/src/scraper.test.ts index 7cafd9c..8c11317 100644 --- a/cgithub/src/scraper.test.ts +++ b/cgithub/src/scraper.test.ts @@ -4,6 +4,7 @@ import { getGitHubBlob, getGitHubCommits, getGitHubIssues, + getGitHubReleases, getGitHubRepo, getGitHubTree, GitHubHTTPError, @@ -159,6 +160,19 @@ describe("GitHub scraper", () => { assert.ok(data.commitGroups.length > 0); }); + + it("should fetch releases", async () => { + const data = await getGitHubReleases("actions", "deploy-pages"); + + assert.strictEqual(data.repo.owner, "actions"); + assert.strictEqual(data.repo.name, "deploy-pages"); + + assert.ok(data.releases.length > 0); + const firstRelease = data.releases[0]; + assert.ok(firstRelease.tagName.length > 0); + assert.ok(firstRelease.title.match(/^v\d/)); + assert.ok(firstRelease.publishedAt.length > 0); + }); }); describe("rich file types", () => { |
