diff --git a/service-tests/node.js b/service-tests/node.js index 856f713d2b1bc..7780025a7d846 100644 --- a/service-tests/node.js +++ b/service-tests/node.js @@ -30,6 +30,11 @@ t.create("gets the tagged release's node version version of ionic") .expectJSONTypes(Joi.object({ name: 'node@next' }).unknown()) .afterJSON(json => { assertIsSemverRange(json.value); }); +t.create('gets the node version of passport from a custom registry') + .get('/v/passport.json?registry_uri=https://registry.npm.taobao.org') + .expectJSONTypes(Joi.object({ name: 'node' }).unknown()) + .afterJSON(json => { assertIsSemverRange(json.value); }); + t.create("gets the tagged release's node version of @cycle/core") .get('/v/@cycle/core/canary.json') .expectJSONTypes(Joi.object({ name: 'node@canary' }).unknown()) diff --git a/service-tests/npm.js b/service-tests/npm.js index 1f051e32fb9c5..09aeca7b722d6 100644 --- a/service-tests/npm.js +++ b/service-tests/npm.js @@ -19,10 +19,18 @@ t.create('gets the tagged package version of npm') .get('/v/npm/next.json') .expectJSONTypes(Joi.object().keys({ name: 'npm@next', value: isSemver })); +t.create('gets the package version of left-pad from a custom registry') + .get('/v/left-pad.json?registry_uri=https://registry.npm.taobao.org') + .expectJSONTypes(Joi.object().keys({ name: 'npm', value: isSemver })); + t.create('gets the tagged package version of @cycle/core') .get('/v/@cycle/core/canary.json') .expectJSONTypes(Joi.object().keys({ name: 'npm@canary', value: isSemver })); +t.create('gets the tagged package version of @cycle/core from a custom registry') + .get('/v/@cycle/core/canary.json?registry_uri=https://registry.npm.taobao.org') + .expectJSONTypes(Joi.object().keys({ name: 'npm@canary', value: isSemver })); + t.create('invalid package name') .get('/v/frodo-is-not-a-package.json') .expectJSON({ name: 'npm', value: 'invalid' });