MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / test_watched_paths

Function test_watched_paths

crates/opencode-watcher/src/lib.rs:291–302  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

289
290 #[test]
291 fn test_watched_paths() {
292 let temp_dir = TempDir::new().unwrap();
293 let watcher = FileWatcher::new(WatcherConfig::default()).unwrap();
294
295 assert!(watcher.watched_paths().is_empty());
296 assert!(!watcher.is_watching(temp_dir.path()));
297
298 watcher.watch(temp_dir.path()).unwrap();
299
300 assert_eq!(watcher.watched_paths().len(), 1);
301 assert!(watcher.is_watching(temp_dir.path()));
302 }
303}

Callers

nothing calls this directly

Calls 2

newFunction · 0.85
watchMethod · 0.80

Tested by

no test coverage detected