diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2023-04-26 21:23:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-26 16:23:28 -0400 |
commit | 3d8a4d3b81e107bbb152ad69047f64d16ca800f3 (patch) | |
tree | 52c8d5e655e3b4bc51aabee1bbfe428a3b7b394a /cli/tools/test.rs | |
parent | c2f5c096925e2fc303f6ea1c36cdba38748c9217 (diff) |
feat(cli): don't check permissions for statically analyzable dynamic imports (#18713)
Closes #17697
Closes #17658
Diffstat (limited to 'cli/tools/test.rs')
-rw-r--r-- | cli/tools/test.rs | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/cli/tools/test.rs b/cli/tools/test.rs index 17d1cebf3..268f3b4b9 100644 --- a/cli/tools/test.rs +++ b/cli/tools/test.rs @@ -1230,7 +1230,6 @@ async fn fetch_inline_files( /// Type check a collection of module and document specifiers. pub async fn check_specifiers( ps: &ProcState, - permissions: Permissions, specifiers: Vec<(ModuleSpecifier, TestMode)>, ) -> Result<(), AnyError> { let lib = ps.options.ts_type_lib_window(); @@ -1265,7 +1264,6 @@ pub async fn check_specifiers( false, lib, PermissionsContainer::new(Permissions::allow_all()), - PermissionsContainer::new(permissions.clone()), ) .await?; } @@ -1287,7 +1285,6 @@ pub async fn check_specifiers( false, lib, PermissionsContainer::allow_all(), - PermissionsContainer::new(permissions), ) .await?; @@ -1648,8 +1645,7 @@ pub async fn run_tests( return Err(generic_error("No test modules found")); } - check_specifiers(&ps, permissions.clone(), specifiers_with_mode.clone()) - .await?; + check_specifiers(&ps, specifiers_with_mode.clone()).await?; if test_options.no_run { return Ok(()); @@ -1821,8 +1817,7 @@ pub async fn run_tests_with_watch( .filter(|(specifier, _)| modules_to_reload.contains(specifier)) .collect::<Vec<(ModuleSpecifier, TestMode)>>(); - check_specifiers(&ps, permissions.clone(), specifiers_with_mode.clone()) - .await?; + check_specifiers(&ps, specifiers_with_mode.clone()).await?; if test_options.no_run { return Ok(()); |