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

Function test_hook_command_exists

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

Source from the content-addressed store, hash-verified

1139
1140 #[test]
1141 fn test_hook_command_exists() {
1142 let matchers = vec![GeminiHookMatcher {
1143 matcher: "".to_string(),
1144 hooks: vec![GeminiHookEntry {
1145 hook_type: "command".to_string(),
1146 command: "atomic agent hooks gemini-cli session-start".to_string(),
1147 name: Some("atomic-session-start".to_string()),
1148 timeout: None,
1149 description: None,
1150 }],
1151 sequential: None,
1152 }];
1153
1154 assert!(hook_command_exists(
1155 &matchers,
1156 "",
1157 "atomic agent hooks gemini-cli session-start"
1158 ));
1159 assert!(!hook_command_exists(
1160 &matchers,
1161 "",
1162 "atomic agent hooks gemini-cli session-end"
1163 ));
1164 assert!(!hook_command_exists(
1165 &matchers,
1166 "some-matcher",
1167 "atomic agent hooks gemini-cli session-start"
1168 ));
1169 }
1170
1171 #[test]
1172 fn test_add_hook_to_matcher_new() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected