diff options
Diffstat (limited to 'cli/tests/integration/repl_tests.rs')
-rw-r--r-- | cli/tests/integration/repl_tests.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/cli/tests/integration/repl_tests.rs b/cli/tests/integration/repl_tests.rs index 1cdc625b2..fe075d37c 100644 --- a/cli/tests/integration/repl_tests.rs +++ b/cli/tests/integration/repl_tests.rs @@ -1058,3 +1058,19 @@ fn closed_file_pre_load_does_not_occur() { assert_contains!(console.all_output(), "Skipping document preload.",); }); } + +#[test] +fn env_file() { + TestContext::default() + .new_command() + .args_vec([ + "repl", + "--env=env", + "--allow-env", + "--eval", + "console.log(Deno.env.get('FOO'))", + ]) + .with_pty(|console| { + assert_contains!(console.all_output(), "BAR",); + }); +} |