From c9db09630d9761b4c7625fbd95f46678124043df Mon Sep 17 00:00:00 2001 From: Casper Beyer Date: Thu, 20 May 2021 21:02:39 +0800 Subject: [PATCH] fix(cli/tools/test_runner): --doc should not require permissions (#10719) --- cli/tests/integration_tests.rs | 2 -- cli/tools/test_runner.rs | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs index ce12056988..aff073d0d2 100644 --- a/cli/tests/integration_tests.rs +++ b/cli/tests/integration_tests.rs @@ -24,7 +24,6 @@ use tokio::task::LocalSet; fn typecheck_declarations_ns() { let status = util::deno_cmd() .arg("test") - .arg("--allow-all") .arg("--doc") .arg(util::root_path().join("cli/dts/lib.deno.ns.d.ts")) .spawn() @@ -41,7 +40,6 @@ fn typecheck_declarations_unstable() { let status = util::deno_cmd() .arg("test") .arg("--doc") - .arg("--allow-all") .arg("--unstable") .arg(util::root_path().join("cli/dts/lib.deno.unstable.d.ts")) .spawn() diff --git a/cli/tools/test_runner.rs b/cli/tools/test_runner.rs index ddfad81996..c650b2d64d 100644 --- a/cli/tools/test_runner.rs +++ b/cli/tools/test_runner.rs @@ -338,9 +338,10 @@ pub async fn run_tests( let lines_regex = Regex::new(r"(?:\* ?)(?:\# ?)?(.*)")?; for specifier in &doc_modules { + let mut fetch_permissions = Permissions::allow_all(); let file = program_state .file_fetcher - .fetch(&specifier, &mut permissions.clone()) + .fetch(&specifier, &mut fetch_permissions) .await?; let parsed_module =