1
0
mirror of https://github.com/badges/shields.git synced 2025-04-18 19:44:04 +03:00
shields/services/github/github-language-count.tester.js
2021-07-09 12:53:55 +01:00

17 lines
528 B
JavaScript

import Joi from 'joi'
import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('language count').get('/badges/shields.json').expectBadge({
label: 'languages',
message: Joi.number().integer().positive(),
})
t.create('language count (empty repo)')
.get('/pyvesb/emptyrepo.json')
.expectBadge({ label: 'languages', message: '0' })
t.create('language count (repo not found)')
.get('/badges/helmets.json')
.expectBadge({ label: 'languages', message: 'repo not found' })