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

Function test_engine_fire_with_continue_handler

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

Source from the content-addressed store, hash-verified

594
595 #[tokio::test]
596 async fn test_engine_fire_with_continue_handler() {
597 let engine = HookEngine::new();
598 engine.register(Hook::new("test-hook", HookEventType::PreToolUse));
599 engine.register_handler("test-hook", Arc::new(ContinueHandler));
600
601 let event = make_pre_tool_event("s1", "Bash");
602 let result = engine.fire(&event).await;
603
604 assert!(result.is_continue());
605 }
606
607 #[tokio::test]
608 async fn test_engine_fire_with_block_handler() {

Callers

nothing calls this directly

Calls 4

register_handlerMethod · 0.80
make_pre_tool_eventFunction · 0.70
registerMethod · 0.45
fireMethod · 0.45

Tested by

no test coverage detected