()
| 228 | |
| 229 | #[test] |
| 230 | fn 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] |
| 250 | fn test_cache_stores_failed_reads() { |
nothing calls this directly
no test coverage detected