From 61b55641cb5d2a324d267dba7e54e98fe0381530 Mon Sep 17 00:00:00 2001 From: Josh Date: Fri, 13 Dec 2024 00:48:24 -0600 Subject: [PATCH] add test for void html tag --- crates/djls-ast/src/parser.rs | 9 +++++++++ .../djls_ast__parser__tests__parse_html_void.snap | 11 +++++++++++ 2 files changed, 20 insertions(+) create mode 100644 crates/djls-ast/src/snapshots/djls_ast__parser__tests__parse_html_void.snap diff --git a/crates/djls-ast/src/parser.rs b/crates/djls-ast/src/parser.rs index 2bd2244..e47e46c 100644 --- a/crates/djls-ast/src/parser.rs +++ b/crates/djls-ast/src/parser.rs @@ -557,6 +557,15 @@ mod tests { insta::assert_yaml_snapshot!(ast); } + #[test] + fn test_parse_html_void() { + let source = r#""#; + let tokens = Lexer::new(source).tokenize().unwrap(); + let mut parser = Parser::new(tokens); + let ast = parser.parse().unwrap(); + insta::assert_yaml_snapshot!(ast); + } + #[test] fn test_parse_script() { let source = r#"