From 71b3437a4c55369b4f8b8d6fa2ee72db31f6f192 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0=20/=20green?= Date: Tue, 3 Dec 2024 16:23:40 +0900 Subject: [PATCH] test(oxc_transformer): define works differently with esbuild (#7593) See https://github.com/oxc-project/oxc/issues/7594 --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> --- .../integrations/plugins/replace_global_defines.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 34b0a87ad..f57edd967 100644 --- a/crates/oxc_transformer/tests/integrations/plugins/replace_global_defines.rs +++ b/crates/oxc_transformer/tests/integrations/plugins/replace_global_defines.rs @@ -59,6 +59,18 @@ fn dot() { test("process['env'].NODE_ENV", "production", config.clone()); } +#[ignore] +#[test] +fn dot_with_overlap() { + let config = ReplaceGlobalDefinesConfig::new(&[ + ("import.meta.env.FOO", "import.meta.env.FOO"), + ("import.meta.env", "__foo__"), + ]) + .unwrap(); + test("import.meta.env", "__foo__", config.clone()); + test("import.meta.env.NODE_ENV", "import.meta.env.NODE_ENV", config.clone()); +} + #[test] fn dot_nested() { let config = ReplaceGlobalDefinesConfig::new(&[("process", "production")]).unwrap();