Skip to content

Commit

Permalink
Fix failing service tests for [bintray npmlicense github crates] (#2401)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmelnikow authored Nov 28, 2018
1 parent 77ff199 commit 43d99f9
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 22 deletions.
10 changes: 5 additions & 5 deletions services/bintray/bintray.tester.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
'use strict'

const Joi = require('joi')
const createServiceTester = require('../create-service-tester')
const { colorScheme } = require('../test-helpers')
const { isVPlusDottedVersionNClauses } = require('../test-validators')

const t = createServiceTester()
const {
isVPlusDottedVersionNClausesWithOptionalSuffix,
} = require('../test-validators')

const t = require('../create-service-tester')()
module.exports = t

t.create('version')
.get('/asciidoctor/maven/asciidoctorj.json')
.expectJSONTypes(
Joi.object().keys({
name: 'bintray',
value: isVPlusDottedVersionNClauses,
value: isVPlusDottedVersionNClausesWithOptionalSuffix,
})
)

Expand Down
18 changes: 18 additions & 0 deletions services/crates/crates-license.tester.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
'use strict'

const ServiceTester = require('../service-tester')

const t = new ServiceTester({
id: 'crates',
title: 'crates.io',
pathPrefix: '/crates/l',
})
module.exports = t

t.create('license')
.get('/libc.json')
.expectJSON({ name: 'license', value: 'MIT OR Apache-2.0' })

t.create('license (with version)')
.get('/libc/0.2.31.json')
.expectJSON({ name: 'license', value: 'MIT OR Apache-2.0' })
14 changes: 0 additions & 14 deletions services/crates/crates.tester.js

This file was deleted.

4 changes: 2 additions & 2 deletions services/github/github.tester.js
Original file line number Diff line number Diff line change
Expand Up @@ -484,11 +484,11 @@ t.create('Package version (repo not found)')

t.create('Package name')
.get('/package-json/n/badges/shields.json')
.expectJSON({ name: 'package name', value: 'gh-badges' })
.expectJSON({ name: 'package name', value: 'shields.io' })

t.create('Package name - Custom label')
.get('/package-json/name/badges/shields.json?label=Dev Name')
.expectJSON({ name: 'Dev Name', value: 'gh-badges' })
.expectJSON({ name: 'Dev Name', value: 'shields.io' })

t.create('Package array')
.get('/package-json/keywords/badges/shields.json')
Expand Down
2 changes: 1 addition & 1 deletion services/npm/npm-license.tester.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ t.create('license for package with a license array')
.expectJSON({
name: 'license',
value: 'MPL-2.0, MIT',
colorB: colorsB.lightgrey,
colorB: colorsB.green,
})

t.create('license for unknown package')
Expand Down

0 comments on commit 43d99f9

Please sign in to comment.