MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_create_watcher_fallback_works

Function test_create_watcher_fallback_works

atomic-agent/src/watcher/mod.rs:407–420  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

405
406 #[tokio::test]
407 async fn test_create_watcher_fallback_works() {
408 let dir = tempfile::TempDir::new().unwrap();
409 let config = WatcherConfig::new(dir.path());
410 let mut watcher = create_watcher(config).await.unwrap();
411
412 watcher.begin_turn("test-session").await.unwrap();
413 assert!(watcher.is_active());
414
415 std::fs::write(dir.path().join("new.rs"), "fn new() {}").unwrap();
416
417 let changes = watcher.end_turn().await.unwrap();
418 assert_eq!(changes.file_count(), 1);
419 assert!(!watcher.is_active());
420 }
421}

Callers

nothing calls this directly

Calls 6

create_watcherFunction · 0.85
writeFunction · 0.85
unwrapMethod · 0.45
pathMethod · 0.45
begin_turnMethod · 0.45
end_turnMethod · 0.45

Tested by

no test coverage detected