test: added additional test coverage to graph components

This commit is contained in:
2026-05-18 10:08:36 -06:00
parent 27fcb1fc15
commit da5cd21c1c
5 changed files with 143 additions and 2 deletions
+21
View File
@@ -863,6 +863,27 @@ nodes:
assert!(graph.conversation_starters.is_empty());
}
#[test]
fn node_ids_lists_nodes_in_order() {
let yaml = r#"
name: g
start: first
nodes:
first:
id: first
type: agent
agent: helper
prompt: hi
next: last
last:
id: last
type: end
output: done
"#;
let graph: Graph = serde_yaml::from_str(yaml).unwrap();
assert_eq!(graph.node_ids(), vec!["first", "last"]);
}
#[test]
fn has_agent_node_detects_agent_nodes() {
let with_agent = r#"