#![deny(warnings)] use sauron::{ html::{attributes::*, *}, *, }; use sauron_macro::node; #[test] fn test_disabled() { let view: Node<()> = node! { }; assert_eq!(view.render_to_string(), r#""#); } #[test] fn test_checked() { let view: Node<()> = node! { }; assert_eq!(view.render_to_string(), r#""#); } #[test] fn test_self_closing_tag() { let view1: Node<()> = main( vec![class("container")], vec![ input(vec![r#type("text")], vec![]), img(vec![src("image1.jpg")], vec![]), ], ); let expected = r#""#; assert_eq!(expected, view1.render_to_string()); } #[test] fn text_node_in_script_work_as_is() { let serialized_state = "hello world"; let view: Node<()> = node! {
}; let expected = r#""#; let result = view.render_to_string(); println!("result: {}", result); assert_eq!(expected, result) }