MCPcopy Create free account
hub / github.com/dallay/agentsync / test_detect_with_explicit_config_files

Function test_detect_with_explicit_config_files

tests/unit/detect_coverage.rs:140–164  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

138
139#[test]
140fn test_detect_with_explicit_config_files() {
141 let temp = TempDir::new().unwrap();
142 let project_root = temp.path();
143
144 // Create Rust project (line 566-574 coverage)
145 fs::write(
146 project_root.join("Cargo.toml"),
147 "[package]\nname = \"test\"",
148 )
149 .unwrap();
150
151 let detector = catalog_detector();
152 let mut cache = ContentCache::new();
153 let detections = detector.detect(project_root, &mut cache).unwrap();
154
155 // Should detect Rust
156 let tech_ids: Vec<_> = detections
157 .iter()
158 .map(|d| d.technology.as_ref().to_string())
159 .collect();
160 assert!(
161 tech_ids.contains(&"rust".to_string()),
162 "Should detect Rust from Cargo.toml"
163 );
164}
165
166#[test]
167fn test_detect_ignores_node_modules_and_git() {

Callers

nothing calls this directly

Calls 4

collectMethod · 0.80
as_refMethod · 0.80
catalog_detectorFunction · 0.70
detectMethod · 0.45

Tested by

no test coverage detected