Files
shields/services/github/github-last-commit.tester.js
Paula Barszcz c0087cae67 Add [GitHubLastCommit] by committer badge (#8537)
* add github last commit by committer badge

* modify queryParam

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-10-20 19:08:48 +00:00

24 lines
870 B
JavaScript

import { isFormattedDate } from '../test-validators.js'
import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('last commit (recent)')
.get('/eslint/eslint.json')
.expectBadge({ label: 'last commit', message: isFormattedDate })
t.create('last commit (ancient)')
.get('/badges/badgr.co.json')
.expectBadge({ label: 'last commit', message: 'january 2014' })
t.create('last commit (on branch)')
.get('/badges/badgr.co/shielded.json')
.expectBadge({ label: 'last commit', message: 'july 2013' })
t.create('last commit (by committer)')
.get('/badges/badgr.co/shielded.json?display_timestamp=committer')
.expectBadge({ label: 'last commit', message: 'july 2013' })
t.create('last commit (repo not found)')
.get('/badges/helmets.json')
.expectBadge({ label: 'last commit', message: 'repo not found' })