From d72c888371ca2140fb46b11e6c794a024331b6c2 Mon Sep 17 00:00:00 2001 From: overlookmotel Date: Fri, 13 Dec 2024 12:26:40 +0000 Subject: [PATCH] test(transformer/replace-global-defines): remove panicking test (#7838) Follow-on after #7811. Remove the panicking test. It *does* currently cause a panic if replacement contains scopes (e.g. `() => 123`) but that's a bug. So we shouldn't have a test saying that it *should* panic. --- .../tests/integrations/plugins/replace_global_defines.rs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/crates/oxc_transformer/tests/integrations/plugins/replace_global_defines.rs b/crates/oxc_transformer/tests/integrations/plugins/replace_global_defines.rs index 828c9c9adb413..4086f8495343b 100644 --- a/crates/oxc_transformer/tests/integrations/plugins/replace_global_defines.rs +++ b/crates/oxc_transformer/tests/integrations/plugins/replace_global_defines.rs @@ -283,10 +283,3 @@ log(__MEMBER__); let snapshot = visualizer.into_visualizer_text(); insta::assert_snapshot!("test_sourcemap", snapshot); } - -#[test] -#[should_panic(expected = "")] -fn test_complex() { - let config = ReplaceGlobalDefinesConfig::new(&[("__DEF__", "((() => {})())")]).unwrap(); - test("__DEF__", "1", config.clone()); -}