Skip to content

Commit

Permalink
Fixed unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
josephg committed May 15, 2014
1 parent 21f7f03 commit 68bf469
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' ||
Expand Down
2 changes: 1 addition & 1 deletion test/unit/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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'))
Expand Down

0 comments on commit 68bf469

Please sign in to comment.