Continue to implement #2698: - Add `core/base-service/index.js` (but hold off on moving the things it imports) - Add shortcuts in `services/index.js` for Base*Service, errors, and deprecatedService. This file will be streamlined later to avoid cluttering it with rarely used bits. - Apply consistent ordering of imports and use of `module.exports` in testers. - Remove some renaming of imports. - Remove obsolete tests here and there.
28 lines
635 B
JavaScript
28 lines
635 B
JavaScript
'use strict'
|
|
|
|
const Joi = require('joi')
|
|
const { ServiceTester } = require('..')
|
|
const { isSemver } = require('../test-validators')
|
|
|
|
const t = (module.exports = new ServiceTester({
|
|
id: 'PuppetForgeModules',
|
|
title: 'PuppetForge Modules',
|
|
pathPrefix: '/puppetforge',
|
|
}))
|
|
|
|
t.create('PDK version')
|
|
.get('/pdk-version/tragiccode/azure_key_vault.json')
|
|
.expectJSONTypes(
|
|
Joi.object().keys({
|
|
name: 'pdk version',
|
|
value: isSemver,
|
|
})
|
|
)
|
|
|
|
t.create("PDK version of a library that doesn't use the PDK")
|
|
.get('/pdk-version/camptocamp/openssl.json')
|
|
.expectJSON({
|
|
name: 'pdk version',
|
|
value: 'none',
|
|
})
|