feat: ensure parsing works with right indicies

This commit is contained in:
Jonathan Kelley committed 2022-04-24 19:38:28 -04:00
1 parent f9d9f85924
commit 4fa909e864
4 files changed
+128 -1

No files matched your search

+38
View File
@@ -93,3 +93,41 @@ fn formats_component_man_props() {
print!("{formatted}");
}
#[test]
fn formats_document() {
let block = r#"
rsx!{
Component {
adsasd: "asd", // this is a comment
onclick: move |_| {
let blah = 120;
},
}
}
"#;
let formatted = formmat_document(block);
print!("{formatted:?}");
}
#[test]
fn formats_valid_rust_src() {
let src = r#"
//
rsx! {
div {}
div {
h3 {"asd"
}
}
}
"#;
let formatted = formmat_document(src);
println!("{formatted:?}");
}