From 246063fb7cd21a83beae5934f95b2795fb85df51 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Fri, 14 Oct 2022 10:49:28 +0200 Subject: Refactor to use default trait in tests --- tests/mdx_expression_flow.rs | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) (limited to 'tests/mdx_expression_flow.rs') diff --git a/tests/mdx_expression_flow.rs b/tests/mdx_expression_flow.rs index fe07743..4281e5d 100644 --- a/tests/mdx_expression_flow.rs +++ b/tests/mdx_expression_flow.rs @@ -12,11 +12,8 @@ use test_utils::swc::{parse_esm, parse_expression}; #[test] fn mdx_expression_flow_agnostic() -> Result<(), String> { let mdx = Options { - parse: ParseOptions { - constructs: Constructs::mdx(), - ..ParseOptions::default() - }, - ..Options::default() + parse: ParseOptions::mdx(), + ..Default::default() }; assert_eq!( @@ -39,11 +36,11 @@ fn mdx_expression_flow_agnostic() -> Result<(), String> { parse: ParseOptions { constructs: Constructs { mdx_expression_flow: true, - ..Constructs::default() + ..Default::default() }, - ..ParseOptions::default() + ..Default::default() }, - ..Options::default() + ..Default::default() } )?, "
{}\n
", @@ -57,11 +54,11 @@ fn mdx_expression_flow_agnostic() -> Result<(), String> { parse: ParseOptions { constructs: Constructs { mdx_expression_flow: true, - ..Constructs::default() + ..Default::default() }, - ..ParseOptions::default() + ..Default::default() }, - ..Options::default() + ..Default::default() } )?, "", @@ -149,9 +146,9 @@ fn mdx_expression_flow_gnostic() -> Result<(), String> { constructs: Constructs::mdx(), mdx_esm_parse: Some(Box::new(parse_esm)), mdx_expression_parse: Some(Box::new(parse_expression)), - ..ParseOptions::default() + ..Default::default() }, - ..Options::default() + ..Default::default() }; assert_eq!( @@ -224,9 +221,9 @@ fn mdx_expression_spread() -> Result<(), String> { constructs: Constructs::mdx(), mdx_esm_parse: Some(Box::new(parse_esm)), mdx_expression_parse: Some(Box::new(parse_expression)), - ..ParseOptions::default() + ..Default::default() }, - ..Options::default() + ..Default::default() }; assert_eq!( -- cgit