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

Source from the content-addressed store, hash-verified

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