aboutsummaryrefslogtreecommitdiffstats
path: root/tests/mdx_esm.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mdx_esm.rs')
-rw-r--r--tests/mdx_esm.rs13
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/mdx_esm.rs b/tests/mdx_esm.rs
index a9c7f4a..d6021a1 100644
--- a/tests/mdx_esm.rs
+++ b/tests/mdx_esm.rs
@@ -4,7 +4,7 @@ use micromark::{
mdast::{MdxjsEsm, Node, Root},
micromark_to_mdast, micromark_with_options,
unist::Position,
- Constructs, Options,
+ Constructs, Options, ParseOptions,
};
use pretty_assertions::assert_eq;
use test_utils::swc::{parse_esm, parse_expression};
@@ -12,9 +12,12 @@ use test_utils::swc::{parse_esm, parse_expression};
#[test]
fn mdx_esm() -> Result<(), String> {
let swc = Options {
- constructs: Constructs::mdx(),
- mdx_esm_parse: Some(Box::new(parse_esm)),
- mdx_expression_parse: Some(Box::new(parse_expression)),
+ parse: ParseOptions {
+ constructs: Constructs::mdx(),
+ mdx_esm_parse: Some(Box::new(parse_esm)),
+ mdx_expression_parse: Some(Box::new(parse_expression)),
+ ..ParseOptions::default()
+ },
..Options::default()
};
@@ -243,7 +246,7 @@ fn mdx_esm() -> Result<(), String> {
}
assert_eq!(
- micromark_to_mdast("import a from 'b'\nexport {a}", &swc)?,
+ micromark_to_mdast("import a from 'b'\nexport {a}", &swc.parse)?,
Node::Root(Root {
children: vec![Node::MdxjsEsm(MdxjsEsm {
value: "import a from 'b'\nexport {a}".to_string(),