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

Function test_remove_atomic_hooks

atomic-agent/src/hooks/gemini_cli.rs:1248–1275  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1246
1247 #[test]
1248 fn test_remove_atomic_hooks() {
1249 let mut matchers = vec![GeminiHookMatcher {
1250 matcher: "".to_string(),
1251 hooks: vec![
1252 GeminiHookEntry {
1253 hook_type: "command".to_string(),
1254 command: "my-custom-hook".to_string(),
1255 name: None,
1256 timeout: None,
1257 description: None,
1258 },
1259 GeminiHookEntry {
1260 hook_type: "command".to_string(),
1261 command: "atomic agent hooks gemini-cli after-agent".to_string(),
1262 name: Some("atomic-turn-end".to_string()),
1263 timeout: None,
1264 description: None,
1265 },
1266 ],
1267 sequential: None,
1268 }];
1269
1270 remove_atomic_hooks(&mut matchers);
1271
1272 assert_eq!(matchers.len(), 1);
1273 assert_eq!(matchers[0].hooks.len(), 1);
1274 assert_eq!(matchers[0].hooks[0].command, "my-custom-hook");
1275 }
1276
1277 #[test]
1278 fn test_remove_atomic_hooks_removes_empty_matchers() {

Callers

nothing calls this directly

Calls 1

remove_atomic_hooksFunction · 0.70

Tested by

no test coverage detected