* init GithubCreatedAt service * render raw created_at * impl formatted date * add color * add test for absent repo * add `reversed` parameter to `age` color formatter * inverse the colors of the badge --------- Co-authored-by: Studio <studio@192.168.1.20>
15 lines
411 B
JavaScript
15 lines
411 B
JavaScript
import { isFormattedDate } from '../test-validators.js'
|
|
import { createServiceTester } from '../tester.js'
|
|
|
|
export const t = await createServiceTester()
|
|
|
|
t.create('created at').get('/erayerdin/firereact.json').expectBadge({
|
|
label: 'created at',
|
|
message: isFormattedDate,
|
|
})
|
|
|
|
t.create('created at').get('/erayerdin/not-a-valid-repo.json').expectBadge({
|
|
label: 'created at',
|
|
message: 'repo not found',
|
|
})
|