diff options
author | Simon Lecoq <22963968+lowlighter@users.noreply.github.com> | 2024-10-03 08:28:38 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-03 12:28:38 +0000 |
commit | da7edf1c0c92dc8b0b746b015da911d5820c64ba (patch) | |
tree | 373c51cc7dad6859f9814bb852cd0a58419cb062 /tests/integration | |
parent | 19a9990f60a7d38137af6239cfa3a7573b883d7d (diff) |
fix: don't prompt when using `Deno.permissions.request` with `--no-prompt` (#25811)
Diffstat (limited to 'tests/integration')
-rw-r--r-- | tests/integration/run_tests.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/integration/run_tests.rs b/tests/integration/run_tests.rs index 1e1d6ed61..b3ad15c81 100644 --- a/tests/integration/run_tests.rs +++ b/tests/integration/run_tests.rs @@ -3513,6 +3513,22 @@ itest!(no_prompt_flag { }); #[test] +fn permission_request_with_no_prompt() { + TestContext::default() + .new_command() + .env("NO_COLOR", "1") + .args_vec([ + "run", + "--quiet", + "--no-prompt", + "run/permission_request_no_prompt.ts", + ]) + .with_pty(|mut console| { + console.expect("PermissionStatus { state: \"denied\", onchange: null }"); + }); +} + +#[test] fn deno_no_prompt_environment_variable() { let output = util::deno_cmd() .current_dir(util::testdata_path()) |