mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 16:33:21 +01:00
integration: validate package-lock.json parsing
Signed-off-by: Alfredo Deza <adeza@anchore.com>
This commit is contained in:
parent
9f314eb493
commit
f1c14d97f6
@ -59,6 +59,14 @@ var cases = []struct {
|
||||
"Pygments": "2.6.1",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "find javascript npm packages",
|
||||
pkgType: pkg.NpmPkg,
|
||||
pkgLanguage: pkg.JavaScript,
|
||||
pkgInfo: map[string]string{
|
||||
"get-stdin": "8.0.0",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "find python egg packages",
|
||||
pkgType: pkg.EggPkg,
|
||||
@ -181,7 +189,7 @@ func TestPkgCoverageImage(t *testing.T) {
|
||||
}
|
||||
|
||||
if expectedVersion != a.Version {
|
||||
t.Errorf("unexpected package version (pkg=%s): %s", a.Name, a.Version)
|
||||
t.Errorf("unexpected package version (pkg=%s): %s, expected: %s", a.Name, a.Version, expectedVersion)
|
||||
}
|
||||
|
||||
if a.Language != c.pkgLanguage {
|
||||
|
||||
11
integration/test-fixtures/image-pkg-coverage/javascript/package-lock/package-lock.json
generated
Normal file
11
integration/test-fixtures/image-pkg-coverage/javascript/package-lock/package-lock.json
generated
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"requires": true,
|
||||
"lockfileVersion": 1,
|
||||
"dependencies": {
|
||||
"get-stdin": {
|
||||
"version": "8.0.0",
|
||||
"resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz",
|
||||
"integrity": "sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg=="
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user