Files
shields/services/twitter/twitter.tester.js
chris48s a12ece3d7c refactor [twitter] service (#3241)
* refactor [twitter] service

* pass screen_names in options.qs
2019-03-31 14:00:37 -05:00

28 lines
621 B
JavaScript

'use strict'
const { isMetric } = require('../test-validators')
const { ServiceTester } = require('../tester')
const t = (module.exports = new ServiceTester({
id: 'twitter',
title: 'Twitter',
}))
t.create('Followers')
.get('/follow/shields_io.json')
.expectBadge({
label: 'follow @shields_io',
message: isMetric,
})
t.create('Invalid Username Specified')
.get('/follow/invalidusernamethatshouldnotexist.json?label=Follow')
.expectBadge({
label: 'Follow',
message: 'invalid user',
})
t.create('URL')
.get('/url/https/shields.io.json')
.expectBadge({ label: 'tweet', message: '' })