Add headless UI tests with kittest

This commit is contained in:
2026-09-10 21:34:12 +02:00
parent 446bb24237
commit 81072b9e0d
9 changed files with 1213 additions and 952 deletions
+1 -14
View File
@@ -1246,17 +1246,4 @@ fn welcome_canvas() -> Canvas {
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn the_welcome_canvas_is_valid_and_connected() {
let canvas = welcome_canvas();
assert_eq!(canvas.nodes.len(), 4);
assert_eq!(canvas.edges.len(), 3);
let mut copy = canvas.clone();
assert_eq!(copy.drop_dangling_edges(), 0);
// And it round-trips through the file format.
assert_eq!(Canvas::from_json(&canvas.to_json()).unwrap(), canvas);
}
}
mod tests;