From 4a0a412d7cd077ff519b4da8f6ffd1247c6375a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 13 Jun 2022 23:13:16 +0200 Subject: feat: no type-check by default (#14691) This commit changes default default behavior of type checking for several subcommands. Instead of type checking and reporting type errors only for local files, the type checking is skipped entirely. Type checking can still be enabled using the "--check" flag. Following subcomands are affected: - deno cache - deno install - deno eval - deno run --- cli/tests/integration/install_tests.rs | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'cli/tests/integration/install_tests.rs') diff --git a/cli/tests/integration/install_tests.rs b/cli/tests/integration/install_tests.rs index 44b418e10..60bfaf50e 100644 --- a/cli/tests/integration/install_tests.rs +++ b/cli/tests/integration/install_tests.rs @@ -14,6 +14,7 @@ fn install_basic() { let status = util::deno_cmd() .current_dir(temp_dir.path()) .arg("install") + .arg("--check") .arg("--name") .arg("echo_test") .arg("http://localhost:4545/echo.ts") @@ -58,6 +59,7 @@ fn install_custom_dir_env_var() { let status = util::deno_cmd() .current_dir(util::root_path()) // different cwd .arg("install") + .arg("--check") .arg("--name") .arg("echo_test") .arg("http://localhost:4545/echo.ts") @@ -188,7 +190,7 @@ fn check_local_by_default2() { let temp_dir = TempDir::new(); let temp_dir_str = temp_dir.path().to_string_lossy().to_string(); - let output = util::deno_cmd() + let status = util::deno_cmd() .current_dir(temp_dir.path()) .arg("install") .arg(util::testdata_path().join("./install/check_local_by_default2.ts")) @@ -198,13 +200,7 @@ fn check_local_by_default2() { ("USERPROFILE", temp_dir_str.as_str()), ("DENO_INSTALL_ROOT", ""), ]) - .output() + .status() .unwrap(); - assert!(!output.status.success()); - let stdout = String::from_utf8(output.stdout).unwrap(); - let stderr = String::from_utf8(output.stderr).unwrap(); - assert!(stdout.is_empty()); - assert!(stderr.contains( - r#"error: TS2322 [ERROR]: Type '12' is not assignable to type '"b"'."# - )); + assert!(status.success()); } -- cgit v1.2.3