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

Function test_add_hook_to_matcher_new

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

Source from the content-addressed store, hash-verified

1199
1200 #[test]
1201 fn test_add_hook_to_matcher_new() {
1202 let mut matchers = Vec::new();
1203 add_hook_to_matcher(
1204 &mut matchers,
1205 "",
1206 "atomic agent hooks gemini-cli session-start",
1207 Some("atomic-session-start"),
1208 );
1209
1210 assert_eq!(matchers.len(), 1);
1211 assert_eq!(matchers[0].hooks.len(), 1);
1212 assert_eq!(
1213 matchers[0].hooks[0].command,
1214 "atomic agent hooks gemini-cli session-start"
1215 );
1216 assert_eq!(
1217 matchers[0].hooks[0].name.as_deref(),
1218 Some("atomic-session-start")
1219 );
1220 }
1221
1222 #[test]
1223 fn test_add_hook_to_matcher_existing() {

Callers

nothing calls this directly

Calls 1

add_hook_to_matcherFunction · 0.70

Tested by

no test coverage detected