included additional support for older npm spec.

Signed-off-by: Toure <tdunnon@gmail.com>
This commit is contained in:
Toure
2020-10-23 08:50:38 -04:00
parent 94e448a818
commit 48c7dee9da
3 changed files with 110 additions and 6 deletions
@@ -43,6 +43,21 @@ func TestParsePackageJSON(t *testing.T) {
},
},
},
{
Fixture: "test-fixtures/pkg-json/package-repo-string.json",
ExpectedPkg: pkg.Package{
Name: "function-bind",
Version: "1.1.1",
Type: pkg.NpmPkg,
Licenses: []string{"MIT"},
Language: pkg.JavaScript,
Metadata: pkg.NpmMetadata{
Author: "Raynos <raynos2@gmail.com>",
Homepage: "https://github.com/Raynos/function-bind",
URL: "git://github.com/Raynos/function-bind.git",
},
},
},
}
for _, test := range tests {