test(last-release): add custom dist-tag

This commit is contained in:
Stephan Bönnemann
2015-07-16 11:51:22 +02:00
parent ba5222af52
commit 6cf1711151
3 changed files with 57 additions and 11 deletions
+9 -1
View File
@@ -2,9 +2,13 @@ const nock = require('nock')
const availableModule = {
'dist-tags': {
latest: '1.33.7'
latest: '1.33.7',
foo: '0.8.15'
},
versions: {
'0.8.15': {
gitHead: 'bar'
},
'1.33.7': {
gitHead: 'HEAD'
}
@@ -14,6 +18,10 @@ const availableModule = {
module.exports = nock('http://registry.npmjs.org')
.get('/available')
.reply(200, availableModule)
.get('/tagged')
.reply(200, availableModule)
.get('/untagged')
.reply(200, availableModule)
.get('/@scoped/available')
.reply(200, availableModule)
.get('/unavailable')