[GithubGistLastCommit] GitHub gist last commit (#8272)
* Add github-gist-last-commit.service.js * Still having difficulty with the reponse in the test file for github-gist-last-commit being in svg format, rather than json * Yay, tests are greeeeen, the best sight for sore eyes xD * Apply suggestions from code review - destructuring+rename and path change Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com> * Removed the unnecessary test from github-gist-last-commit Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
This commit is contained in:
24
services/github/github-gist-last-commit.tester.js
Normal file
24
services/github/github-gist-last-commit.tester.js
Normal file
@@ -0,0 +1,24 @@
|
||||
import { createServiceTester } from '../tester.js'
|
||||
export const t = await createServiceTester()
|
||||
|
||||
t.create('last commit in gist (ancient)').get('/871064.json').expectBadge({
|
||||
label: 'last commit',
|
||||
message: 'september 2015',
|
||||
color: 'red',
|
||||
})
|
||||
|
||||
// not checking the color badge, since in August 2022 it is orange but later it will become red
|
||||
t.create('last commit in gist (still ancient but slightly less so)')
|
||||
.get('/870071abadfd66a28bf539677332f12b.json')
|
||||
.expectBadge({
|
||||
label: 'last commit',
|
||||
message: 'october 2020',
|
||||
})
|
||||
|
||||
t.create('last commit in gist (gist not found)')
|
||||
.get('/55555555555555.json')
|
||||
.expectBadge({
|
||||
label: 'last commit',
|
||||
message: 'gist not found',
|
||||
color: 'red',
|
||||
})
|
||||
Reference in New Issue
Block a user