@@ -275,6 +275,13 @@ def test_parse_package_lock_v2_2(self):
275275 packages = npm .NpmPackageLockJsonHandler .parse (test_file )
276276 self .check_packages_data (packages , expected_loc , regen = REGEN_TEST_FIXTURES )
277277
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+
278285 def test_is_datafile_npm_shrinkwrap_json (self ):
279286 test_file = self .get_test_loc ('npm/npm-shrinkwrap/npm-shrinkwrap.json' )
280287 assert npm .NpmShrinkwrapJsonHandler .is_datafile (test_file )
@@ -360,10 +367,10 @@ def test_npm_yarn_with_package_json_resolve_dependencies(self):
360367 expected_file , result_file , remove_uuid = True , regen = REGEN_TEST_FIXTURES
361368 )
362369
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' )
365372 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' )
367374 packages = npm .YarnLockV1Handler .parse (test_file )
368375 self .check_packages_data (packages , expected_loc , regen = REGEN_TEST_FIXTURES )
369376
@@ -393,9 +400,9 @@ def test_parse_pnpm_shrinkwrap_yaml(self):
393400 packages = npm .PnpmLockYamlHandler .parse (test_file )
394401 self .check_packages_data (packages , expected_loc , regen = REGEN_TEST_FIXTURES )
395402
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' )
399406 packages = npm .NpmPackageJsonHandler .parse (test_file )
400407 self .check_packages_data (packages , expected_loc , regen = REGEN_TEST_FIXTURES )
401408
0 commit comments