Skip to content

Commit

Permalink
test(oxc_transformer): define works differently with esbuild (#7593)
Browse files Browse the repository at this point in the history
See #7594

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
  • Loading branch information
sapphi-red and autofix-ci[bot] authored Dec 3, 2024
1 parent 16adaf9 commit 71b3437
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 71b3437

Please sign in to comment.