Make a few github tests more reliable (#2292)

The version test is failing because the shields repo version is not a dotted version.
This commit is contained in:
Paul Melnikow
2018-11-08 14:48:44 -05:00
committed by GitHub
parent e240409033
commit 611e58e43e

View File

@@ -9,6 +9,7 @@ const {
isFileSize,
isFormattedDate,
isVPlusDottedVersionAtLeastOne,
isSemver,
} = require('../test-validators')
const colorscheme = require('../../lib/colorscheme.json')
const { licenseToColor } = require('../../lib/licenses')
@@ -472,7 +473,7 @@ t.create('Package version')
.expectJSONTypes(
Joi.object().keys({
name: 'package',
value: isVPlusDottedVersionAtLeastOne,
value: isSemver,
})
)
@@ -639,12 +640,12 @@ t.create('downloads for unknown release')
t.create('hit counter')
.get('/search/torvalds/linux/goto.json')
.timeout(8000)
.timeout(10000)
.expectJSONTypes(Joi.object().keys({ name: 'goto counter', value: isMetric }))
t.create('hit counter for nonexistent repo')
.get('/search/torvalds/not-linux/goto.json')
.timeout(8000)
.timeout(10000)
.expectJSON({ name: 'goto counter', value: 'repo not found' })
t.create('commit activity (1 year)')