Files
shields/services/liberapay/liberapay-goal.tester.js
Caleb Cartwright 9fe4d739b0 fix [LiberapayGoal] type error when no receiving data exists (#4029)
* fix(LiberapayGoal): type error when no receiving data exists

* chore: prettify things
2019-09-16 00:39:34 +00:00

16 lines
424 B
JavaScript

'use strict'
const { isIntegerPercentage } = require('../test-validators')
const t = (module.exports = require('../tester').createServiceTester())
t.create('Goal Progress (valid)')
.get('/Liberapay.json')
.expectBadge({
label: 'goal progress',
message: isIntegerPercentage,
})
t.create('Goal Progress (not found)')
.get('/does-not-exist.json')
.expectBadge({ label: 'liberapay', message: 'not found' })