mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-03-25 02:32:52 -05:00
Fixed unit tests
This commit is contained in:
parent
21f7f03cf7
commit
68bf469ad4
2 changed files with 2 additions and 2 deletions
|
@ -10,7 +10,7 @@ module.exports.validate_name = function(name) {
|
|||
if (
|
||||
name.charAt(0) === '.' || // ".bin", etc.
|
||||
name.charAt(0) === '-' || // "-" is reserved by couchdb
|
||||
name.match(/[\/\s\+%:]/) ||
|
||||
name.match(/[\\\/\s\+%:]/) ||
|
||||
name === 'node_modules' ||
|
||||
name === '__proto__' ||
|
||||
name === 'package.json' ||
|
||||
|
|
|
@ -5,6 +5,7 @@ describe('Validate', function() {
|
|||
it('good ones', function() {
|
||||
assert(validate('sinopia'))
|
||||
assert(validate('some.weird.package-zzz'))
|
||||
assert(validate('old-package@0.1.2.tgz'))
|
||||
})
|
||||
|
||||
it('uppercase', function() {
|
||||
|
@ -32,7 +33,6 @@ describe('Validate', function() {
|
|||
})
|
||||
|
||||
it('other', function() {
|
||||
assert(!validate('pkg@'))
|
||||
assert(!validate('pk g'))
|
||||
assert(!validate('pk\tg'))
|
||||
assert(!validate('pk%20g'))
|
||||
|
|
Loading…
Add table
Reference in a new issue