blob: a580155e63257de0e2681c3a45d51eff6e94d7f5 [file] [log] [blame] [edit]
use html_parser::{Dom, Result};
use insta::assert_json_snapshot;
#[test]
fn it_can_parse_document_with_just_one_comment() -> Result<()> {
let html = "<!-- hello !\"#/()= -->";
let ast = Dom::parse(html)?;
assert_json_snapshot!(ast);
Ok(())
}
#[test]
fn it_can_parse_document_with_just_comments() -> Result<()> {
let html = "<!--x--><!--y--><!--z-->";
let ast = Dom::parse(html)?;
assert_json_snapshot!(ast);
Ok(())
}