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

Function test_all_hooks

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

Source from the content-addressed store, hash-verified

681
682 #[test]
683 fn test_all_hooks() {
684 let engine = HookEngine::new();
685 engine.register(Hook::new("hook-1", HookEventType::PreToolUse));
686 engine.register(Hook::new("hook-2", HookEventType::PostToolUse));
687
688 let all = engine.all_hooks();
689 assert_eq!(all.len(), 2);
690 }
691
692 fn make_skill_load_event(skill_name: &str, tools: Vec<&str>) -> HookEvent {
693 HookEvent::SkillLoad(crate::hooks::events::SkillLoadEvent {

Callers

nothing calls this directly

Calls 2

all_hooksMethod · 0.80
registerMethod · 0.45

Tested by

no test coverage detected