From 930630506c6d42250b5fe6b883ac65b2e9ba668b Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Fri, 14 Oct 2022 09:35:42 +0200 Subject: Add some more tests on mdx and indented code --- tests/mdx_jsx_flow.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'tests/mdx_jsx_flow.rs') diff --git a/tests/mdx_jsx_flow.rs b/tests/mdx_jsx_flow.rs index 85abcd3..337b4cd 100644 --- a/tests/mdx_jsx_flow.rs +++ b/tests/mdx_jsx_flow.rs @@ -30,6 +30,7 @@ fn mdx_jsx_flow_agnostic() -> Result<(), String> { &Options { parse: ParseOptions { constructs: Constructs { + html_flow: false, mdx_jsx_flow: true, ..Constructs::default() }, @@ -42,6 +43,25 @@ fn mdx_jsx_flow_agnostic() -> Result<(), String> { "should prefer indented code over jsx if it’s enabled" ); + assert_eq!( + to_html_with_options( + " ", + &Options { + parse: ParseOptions { + constructs: Constructs { + html_flow: false, + mdx_jsx_flow: true, + ..Constructs::default() + }, + ..ParseOptions::default() + }, + ..Options::default() + } + )?, + "", + "should support indented jsx if indented code is enabled" + ); + assert_eq!( to_html_with_options("", &mdx)?, "", -- cgit