1
0
mirror of https://github.com/badges/shields.git synced 2025-07-14 14:41:02 +03:00

Add [StackExchange] monthly questions badge service (#2432)

- Badge shows number of questions for a given library for the previous month (not current month because its in progress)
- Service works for not just the StackOverflow site but for other StackExchange sites also

Close #2378
This commit is contained in:
Monica Bui
2018-12-03 18:12:44 -07:00
committed by Paul Melnikow
parent 99e846d2ab
commit ec07f23942
4 changed files with 134 additions and 10 deletions

View File

@ -0,0 +1,24 @@
'use strict'
const Joi = require('joi')
const { isMetricOverTimePeriod } = require('../test-validators')
const t = require('../create-service-tester')()
module.exports = t
t.create('Monthly Questions for StackOverflow Momentjs')
.get('/stackoverflow/qm/momentjs.json')
.expectJSONTypes(
Joi.object().keys({
name: 'stackoverflow momentjs questions',
value: isMetricOverTimePeriod,
})
)
t.create('Monthly Questions for Tex Spacing')
.get('/tex/qm/spacing.json')
.expectJSONTypes(
Joi.object().keys({
name: 'tex spacing questions',
value: isMetricOverTimePeriod,
})
)