mirror of
https://github.com/denoland/deno.git
synced 2025-10-02 07:01:16 +00:00
refactor(cli/tools/test): infer disable log from program state (#11803)
This commit is contained in:
parent
dbcdd3a18e
commit
2c17045aa8
3 changed files with 2 additions and 18 deletions
|
@ -21,6 +21,7 @@ use deno_core::serde_json::json;
|
|||
use deno_core::JsRuntime;
|
||||
use deno_core::ModuleSpecifier;
|
||||
use deno_runtime::permissions::Permissions;
|
||||
use log::Level;
|
||||
use rand::rngs::SmallRng;
|
||||
use rand::seq::SliceRandom;
|
||||
use rand::SeedableRng;
|
||||
|
@ -200,7 +201,6 @@ pub async fn test_specifier(
|
|||
program_state: Arc<ProgramState>,
|
||||
main_module: ModuleSpecifier,
|
||||
permissions: Permissions,
|
||||
quiet: bool,
|
||||
filter: Option<String>,
|
||||
shuffle: Option<u64>,
|
||||
channel: Sender<TestEvent>,
|
||||
|
@ -228,7 +228,7 @@ pub async fn test_specifier(
|
|||
test_source.push_str(&format!(
|
||||
"await Deno[Deno.internal].runTests({});\n",
|
||||
json!({
|
||||
"disableLog": quiet,
|
||||
"disableLog": program_state.flags.log_level == Some(Level::Error),
|
||||
"filter": filter,
|
||||
"shuffle": shuffle,
|
||||
}),
|
||||
|
@ -470,7 +470,6 @@ pub async fn run_tests(
|
|||
test_modules: Vec<ModuleSpecifier>,
|
||||
no_run: bool,
|
||||
fail_fast: Option<NonZeroUsize>,
|
||||
quiet: bool,
|
||||
allow_none: bool,
|
||||
filter: Option<String>,
|
||||
shuffle: Option<u64>,
|
||||
|
@ -559,7 +558,6 @@ pub async fn run_tests(
|
|||
program_state,
|
||||
main_module,
|
||||
permissions,
|
||||
quiet,
|
||||
filter,
|
||||
shuffle,
|
||||
sender,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue