Skip to content

Commit

Permalink
test: define works differently with esbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red authored and IWANABETHATGUY committed Dec 3, 2024
1 parent 16adaf9 commit 673f3fd
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ 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 673f3fd

Please sign in to comment.