Add headless UI tests with kittest
This commit is contained in:
+1
-14
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user