From 6c179daff07fe60d478142ea86231a34dc9ee1fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Thu, 8 Sep 2022 22:01:48 +0200 Subject: fix(npm): recursive translation of reexports, remove window global in node code (#15806) Co-authored-by: David Sherret --- cli/tests/integration/npm_tests.rs | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) (limited to 'cli/tests/integration/npm_tests.rs') diff --git a/cli/tests/integration/npm_tests.rs b/cli/tests/integration/npm_tests.rs index 9c16e23c1..463cec5a3 100644 --- a/cli/tests/integration/npm_tests.rs +++ b/cli/tests/integration/npm_tests.rs @@ -89,13 +89,33 @@ itest!(dual_cjs_esm { http_server: true, }); -itest!(dynamic_import { - args: "run --allow-read --allow-env --unstable npm/dynamic_import/main.ts", - output: "npm/dynamic_import/main.out", +// FIXME(bartlomieju): npm: specifiers are not handled in dynamic imports +// at the moment +// itest!(dynamic_import { +// args: "run --allow-read --allow-env --unstable npm/dynamic_import/main.ts", +// output: "npm/dynamic_import/main.out", +// envs: env_vars(), +// http_server: true, +// }); + +itest!(env_var_re_export_dev { + args: "run --allow-read --allow-env --unstable --quiet npm/env_var_re_export/main.js", + output_str: Some("dev\n"), envs: env_vars(), http_server: true, }); +itest!(env_var_re_export_prod { + args: "run --allow-read --allow-env --unstable --quiet npm/env_var_re_export/main.js", + output_str: Some("prod\n"), + envs: { + let mut vars = env_vars(); + vars.push(("NODE_ENV".to_string(), "production".to_string())); + vars + }, + http_server: true, +}); + itest!(cached_only { args: "run --cached-only --unstable npm/cached_only/main.ts", output: "npm/cached_only/main.out", -- cgit v1.2.3