fix(verify): ensure repo url in package.json is well formed

This commit is contained in:
Stephan Bönnemann
2015-07-16 14:07:52 +02:00
parent dbea5cc1b1
commit 431babb42e
2 changed files with 19 additions and 0 deletions
+12
View File
@@ -23,6 +23,18 @@ test('verify pkg, options and env', (t) => {
tt.is(errors[0].code, 'ENOPKGNAME')
tt.is(errors[1].code, 'ENOPKGREPO')
const errors2 = verify({
name: 'package',
repository: {
url: 'lol'
}
}, {
debug: true
}, {})
tt.is(errors2.length, 1)
tt.is(errors2[0].code, 'EMALFORMEDPKGREPO')
tt.end()
})