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

Function test_detect_with_empty_project

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

Source from the content-addressed store, hash-verified

228
229#[test]
230fn test_detect_with_empty_project() {
231 let temp = TempDir::new().unwrap();
232 let project_root = temp.path();
233
234 // Empty project - no files
235 let detector = catalog_detector();
236 let mut cache = ContentCache::new();
237 let detections = detector.detect(project_root, &mut cache).unwrap();
238
239 // An empty project has no files, so no technology should be detected.
240 // Up to 2 detections are tolerated in case future catalog rules add baseline
241 // markers that fire on an empty tree (known noise); zero is the expected case.
242 assert!(
243 detections.len() < 3,
244 "Empty project should have 0 detections (tolerance ≤2 for baseline catalog noise), got {}",
245 detections.len()
246 );
247}
248
249#[test]
250fn test_cache_stores_failed_reads() {

Callers

nothing calls this directly

Calls 2

catalog_detectorFunction · 0.70
detectMethod · 0.45

Tested by

no test coverage detected