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

Function test_take_snapshot_nested_dirs

atomic-agent/src/watcher/fallback.rs:300–310  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

298
299 #[test]
300 fn test_take_snapshot_nested_dirs() {
301 let dir = TempDir::new().unwrap();
302 fs::create_dir_all(dir.path().join("src/auth")).unwrap();
303 fs::write(dir.path().join("src/main.rs"), "fn main() {}").unwrap();
304 fs::write(dir.path().join("src/auth/login.rs"), "fn login() {}").unwrap();
305
306 let snapshot = take_snapshot(dir.path(), &[".atomic".to_string()]).unwrap();
307 assert_eq!(snapshot.len(), 2);
308 assert!(snapshot.contains_key(Path::new("src/main.rs")));
309 assert!(snapshot.contains_key(Path::new("src/auth/login.rs")));
310 }
311
312 #[test]
313 fn test_take_snapshot_ignores_atomic_dir() {

Callers

nothing calls this directly

Calls 4

writeFunction · 0.85
take_snapshotFunction · 0.85
unwrapMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected