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

Source from the content-addressed store, hash-verified

1170
1171 #[test]
1172 fn test_add_hook_to_matcher_new() {
1173 let mut matchers = Vec::new();
1174 add_hook_to_matcher(
1175 &mut matchers,
1176 "",
1177 "atomic agent hooks gemini-cli session-start",
1178 Some("atomic-session-start"),
1179 );
1180
1181 assert_eq!(matchers.len(), 1);
1182 assert_eq!(matchers[0].hooks.len(), 1);
1183 assert_eq!(
1184 matchers[0].hooks[0].command,
1185 "atomic agent hooks gemini-cli session-start"
1186 );
1187 assert_eq!(
1188 matchers[0].hooks[0].name.as_deref(),
1189 Some("atomic-session-start")
1190 );
1191 }
1192
1193 #[test]
1194 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