@@ -275,6 +275,13 @@ def test_parse_package_lock_v2_2(self):
275
275
packages = npm .NpmPackageLockJsonHandler .parse (test_file )
276
276
self .check_packages_data (packages , expected_loc , regen = REGEN_TEST_FIXTURES )
277
277
278
+ def test_parse_package_lock_v2_alias (self ):
279
+ test_file = self .get_test_loc ('npm/alias/package-lock.json' )
280
+ expected_loc = self .get_test_loc (
281
+ 'npm/alias/package-lock.json.expected' )
282
+ packages = npm .NpmPackageLockJsonHandler .parse (test_file )
283
+ self .check_packages_data (packages , expected_loc , regen = REGEN_TEST_FIXTURES )
284
+
278
285
def test_is_datafile_npm_shrinkwrap_json (self ):
279
286
test_file = self .get_test_loc ('npm/npm-shrinkwrap/npm-shrinkwrap.json' )
280
287
assert npm .NpmShrinkwrapJsonHandler .is_datafile (test_file )
@@ -360,10 +367,10 @@ def test_npm_yarn_with_package_json_resolve_dependencies(self):
360
367
expected_file , result_file , remove_uuid = True , regen = REGEN_TEST_FIXTURES
361
368
)
362
369
363
- def test_npm_yarn_lock_v1_parse_with_other_version_constraint (self ):
364
- test_file = self .get_test_loc ('npm/yarn-lock/v1-other-constraint /yarn.lock' )
370
+ def test_npm_yarn_lock_v1_parse_alias (self ):
371
+ test_file = self .get_test_loc ('npm/yarn-lock/v1-alias /yarn.lock' )
365
372
expected_loc = self .get_test_loc (
366
- 'npm/yarn-lock/v1-other-constraint /yarn.lock-expected' )
373
+ 'npm/yarn-lock/v1-alias /yarn.lock-expected' )
367
374
packages = npm .YarnLockV1Handler .parse (test_file )
368
375
self .check_packages_data (packages , expected_loc , regen = REGEN_TEST_FIXTURES )
369
376
@@ -393,9 +400,9 @@ def test_parse_pnpm_shrinkwrap_yaml(self):
393
400
packages = npm .PnpmLockYamlHandler .parse (test_file )
394
401
self .check_packages_data (packages , expected_loc , regen = REGEN_TEST_FIXTURES )
395
402
396
- def test_parse_package_json_special_dep_requirements (self ):
397
- test_file = self .get_test_loc ('npm/special_extracted_requirements /package.json' )
398
- expected_loc = self .get_test_loc ('npm/special_extracted_requirements /package.json.expected' )
403
+ def test_parse_package_json_alias_requirements (self ):
404
+ test_file = self .get_test_loc ('npm/alias /package.json' )
405
+ expected_loc = self .get_test_loc ('npm/alias /package.json.expected' )
399
406
packages = npm .NpmPackageJsonHandler .parse (test_file )
400
407
self .check_packages_data (packages , expected_loc , regen = REGEN_TEST_FIXTURES )
401
408
0 commit comments