1
0
mirror of https://github.com/badges/shields.git synced 2025-11-06 14:09:31 +03:00

Split [pypi] tests (#3704)

* Split [pypi] tests

* Changed filenames to match previous class names
This commit is contained in:
Pierre-Yves B
2019-07-13 16:45:58 +01:00
committed by Caleb Cartwright
parent 6cbc7b587a
commit 102db63d46
11 changed files with 244 additions and 236 deletions

View File

@@ -0,0 +1,22 @@
'use strict'
const t = (module.exports = require('../tester').createServiceTester())
t.create('implementation (valid, package version in request)')
.get('/beehive/1.0.json')
.expectBadge({ label: 'implementation', message: 'cpython | jython | pypy' })
t.create('implementation (valid, no package version specified)')
.get('/numpy.json')
.expectBadge({ label: 'implementation', message: 'cpython' })
t.create('implementation (not specified)')
.get('/chai/1.1.2.json')
.expectBadge({ label: 'implementation', message: 'cpython' })
t.create('implementation (invalid)')
.get('/not-a-package.json')
.expectBadge({
label: 'implementation',
message: 'package or version not found',
})