Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make a few [github] tests more reliable #2292

Merged
merged 2 commits into from
Nov 8, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions services/github/github.tester.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const {
isFileSize,
isFormattedDate,
isVPlusDottedVersionAtLeastOne,
isSemver,
} = require('../test-validators')
const colorscheme = require('../../lib/colorscheme.json')
const { licenseToColor } = require('../../lib/licenses')
Expand Down Expand Up @@ -472,7 +473,7 @@ t.create('Package version')
.expectJSONTypes(
Joi.object().keys({
name: 'package',
value: isVPlusDottedVersionAtLeastOne,
value: isSemver,
})
)

Expand Down Expand Up @@ -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)')
Expand Down