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

Source from the content-addressed store, hash-verified

1204
1205 #[test]
1206 fn test_add_hook_to_matcher_new() {
1207 let mut matchers = Vec::new();
1208 add_hook_to_matcher(
1209 &mut matchers,
1210 "",
1211 "atomic agent hooks gemini-cli session-start",
1212 Some("atomic-session-start"),
1213 );
1214
1215 assert_eq!(matchers.len(), 1);
1216 assert_eq!(matchers[0].hooks.len(), 1);
1217 assert_eq!(
1218 matchers[0].hooks[0].command,
1219 "atomic agent hooks gemini-cli session-start"
1220 );
1221 assert_eq!(
1222 matchers[0].hooks[0].name.as_deref(),
1223 Some("atomic-session-start")
1224 );
1225 }
1226
1227 #[test]
1228 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