mirror of
https://github.com/badges/shields.git
synced 2025-07-27 19:01:52 +03:00
Migrated most service tests to use new expectBadge (#3122)
This commit is contained in:
@ -1,23 +1,18 @@
|
||||
'use strict'
|
||||
|
||||
const Joi = require('joi')
|
||||
const { isMetricOverTimePeriod } = require('../test-validators')
|
||||
const t = (module.exports = require('../tester').createServiceTester())
|
||||
|
||||
t.create('Monthly Questions for StackOverflow Momentjs')
|
||||
.get('/stackoverflow/qm/momentjs.json')
|
||||
.expectJSONTypes(
|
||||
Joi.object().keys({
|
||||
name: 'stackoverflow momentjs questions',
|
||||
value: isMetricOverTimePeriod,
|
||||
})
|
||||
)
|
||||
.expectBadge({
|
||||
label: 'stackoverflow momentjs questions',
|
||||
message: isMetricOverTimePeriod,
|
||||
})
|
||||
|
||||
t.create('Monthly Questions for Tex Spacing')
|
||||
.get('/tex/qm/spacing.json')
|
||||
.expectJSONTypes(
|
||||
Joi.object().keys({
|
||||
name: 'tex spacing questions',
|
||||
value: isMetricOverTimePeriod,
|
||||
})
|
||||
)
|
||||
.expectBadge({
|
||||
label: 'tex spacing questions',
|
||||
message: isMetricOverTimePeriod,
|
||||
})
|
||||
|
Reference in New Issue
Block a user