From 34311fb1bd42e7adb9554d01fb0baeff1dcd3898 Mon Sep 17 00:00:00 2001 From: o2sh Date: Sun, 22 Feb 2026 12:12:43 +0100 Subject: [PATCH] fix --- .../package.json | 21 ------------------- .../npm_without_dependencies/package.json | 10 --------- manifest/tests/npm.rs | 20 ------------------ 3 files changed, 51 deletions(-) delete mode 100644 manifest/tests/fixtures/npm_only_dependencies_counted/package.json delete mode 100644 manifest/tests/fixtures/npm_without_dependencies/package.json diff --git a/manifest/tests/fixtures/npm_only_dependencies_counted/package.json b/manifest/tests/fixtures/npm_only_dependencies_counted/package.json deleted file mode 100644 index 9fd44e56..00000000 --- a/manifest/tests/fixtures/npm_only_dependencies_counted/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "mixed_deps_package", - "version": "1.2.3", - "dependencies": { - "a": "^1.0.0", - "b": "^2.0.0" - }, - "devDependencies": { - "c": "^3.0.0" - }, - "peerDependencies": { - "d": "^4.0.0", - "e": "^5.0.0" - }, - "optionalDependencies": { - "f": "^6.0.0" - }, - "bundledDependencies": [ - "g" - ] -} diff --git a/manifest/tests/fixtures/npm_without_dependencies/package.json b/manifest/tests/fixtures/npm_without_dependencies/package.json deleted file mode 100644 index 899b0339..00000000 --- a/manifest/tests/fixtures/npm_without_dependencies/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "no_runtime_deps_package", - "version": "0.0.1", - "devDependencies": { - "typescript": "^5.0.0" - }, - "peerDependencies": { - "react": "^19.0.0" - } -} diff --git a/manifest/tests/npm.rs b/manifest/tests/npm.rs index e576a81a..5fcacb1c 100644 --- a/manifest/tests/npm.rs +++ b/manifest/tests/npm.rs @@ -17,23 +17,3 @@ fn should_detect_and_parse_npm_manifest() -> Result<()> { assert_eq!(npm_manifest.license, Some("ISC".into())); Ok(()) } - -#[test] -fn should_only_count_dependencies_for_npm_manifest() -> Result<()> { - let manifests = get_manifests("tests/fixtures/npm_only_dependencies_counted")?; - assert_eq!(manifests.len(), 1); - let npm_manifest = manifests.first().unwrap(); - assert_eq!(npm_manifest.manifest_type, ManifestType::Npm); - assert_eq!(npm_manifest.number_of_dependencies, 2); - Ok(()) -} - -#[test] -fn should_count_zero_when_npm_dependencies_field_is_missing() -> Result<()> { - let manifests = get_manifests("tests/fixtures/npm_without_dependencies")?; - assert_eq!(manifests.len(), 1); - let npm_manifest = manifests.first().unwrap(); - assert_eq!(npm_manifest.manifest_type, ManifestType::Npm); - assert_eq!(npm_manifest.number_of_dependencies, 0); - Ok(()) -}