#[test] fn empty() { let mut items = willdo::config::read("then:".as_bytes(), "urn:reader").into_iter(); insta::assert_debug_snapshot!(items.next().expect("trig").expect("trig")); } #[test] fn empty_array() { let mut items = willdo::config::read("then: []".as_bytes(), "urn:reader").into_iter(); insta::assert_debug_snapshot!(items.next().expect("trig").expect("trig")); } #[test] fn start_code_1() { let mut items = willdo::config::read( r###" then: - start: other code: 1 "### .as_bytes(), "urn:reader", ) .into_iter(); insta::assert_debug_snapshot!(items.next().expect("foo").expect("foo")); } #[test] fn fail_empty_object() { let mut items = willdo::config::read( r###" then: {} "### .as_bytes(), "urn:reader", ) .into_iter(); assert!(items.next().expect("foo").is_err()); }