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:533–546  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

531
532 #[tokio::test]
533 async fn test_create_watcher_fallback_works() {
534 let dir = tempfile::TempDir::new().unwrap();
535 let config = WatcherConfig::new(dir.path());
536 let mut watcher = create_watcher(config).await.unwrap();
537
538 watcher.begin_turn("test-session").await.unwrap();
539 assert!(watcher.is_active());
540
541 std::fs::write(dir.path().join("new.rs"), "fn new() {}").unwrap();
542
543 let changes = watcher.end_turn().await.unwrap();
544 assert_eq!(changes.file_count(), 1);
545 assert!(!watcher.is_active());
546 }
547}

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected