Move package name validation into parsePackageURL

This commit is contained in:
MICHAEL JACKSON
2017-11-14 16:44:53 -08:00
parent 67a17a961b
commit 4b3f606d7d
4 changed files with 15 additions and 5 deletions

View File

@ -80,5 +80,6 @@ describe('parsePackageURL', () => {
it('returns null for invalid pathnames', () => {
expect(parsePackageURL('history')).toBe(null)
expect(parsePackageURL('/.invalid')).toBe(null)
})
})