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

Function test_parse_prompt_submit

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

make_hookFunction · 0.70
unwrapMethod · 0.45
parse_eventMethod · 0.45

Tested by

no test coverage detected