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:
@@ -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)')
|
||||
|
||||
Reference in New Issue
Block a user