MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_parse_prompt_submit

Function test_parse_prompt_submit

atomic-agent/src/hooks/kiro.rs:575–590  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

573
574 #[test]
575 fn test_parse_prompt_submit() {
576 let hook = make_hook();
577 let input = br#"{
578 "session_id": "kiro-20260521-153000",
579 "cwd": "/path/to/project",
580 "model": "claude-sonnet-4-6",
581 "prompt": "Fix the bug",
582 "timestamp": "2026-05-21T15:30:00Z"
583 }"#;
584 let event = hook.parse_event(HookType::TurnStart, input).unwrap();
585 assert_eq!(event.session_id, "kiro-20260521-153000");
586 assert_eq!(event.event_type, HookType::TurnStart);
587 assert_eq!(event.prompt.as_deref(), Some("Fix the bug"));
588 let raw = event.raw_json.unwrap();
589 assert_eq!(raw["model"], "claude-sonnet-4-6");
590 }
591
592 // --- parse_event: agent-stop (TurnEnd) ---
593

Callers

nothing calls this directly

Calls 3

make_hookFunction · 0.70
unwrapMethod · 0.45
parse_eventMethod · 0.45

Tested by

no test coverage detected