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

Function test_parse_prompt_submit

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

make_hookFunction · 0.70
unwrapMethod · 0.45
parse_eventMethod · 0.45

Tested by

no test coverage detected