MCPcopy Index your code
hub / github.com/AI45Lab/Code / test_hook_with_matcher

Function test_hook_with_matcher

core/src/hooks/engine.rs:445–451  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

443
444 #[test]
445 fn test_hook_with_matcher() {
446 let hook = Hook::new("test-hook", HookEventType::PreToolUse)
447 .with_matcher(HookMatcher::tool("Bash"));
448
449 assert!(hook.matcher.is_some());
450 assert_eq!(hook.matcher.unwrap().tool, Some("Bash".to_string()));
451 }
452
453 #[test]
454 fn test_hook_matches_event_type() {

Callers

nothing calls this directly

Calls 1

with_matcherMethod · 0.80

Tested by

no test coverage detected