summaryrefslogtreecommitdiff
path: root/cli/tests/integration/install_tests.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2022-06-13 23:13:16 +0200
committerGitHub <noreply@github.com>2022-06-13 23:13:16 +0200
commit4a0a412d7cd077ff519b4da8f6ffd1247c6375a5 (patch)
treee5ad94395d7450db832d77cd158a4218ea50d038 /cli/tests/integration/install_tests.rs
parent24571a395203aad7cda07ffef0ef64285351e42b (diff)
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
Diffstat (limited to 'cli/tests/integration/install_tests.rs')
-rw-r--r--cli/tests/integration/install_tests.rs14
1 files changed, 5 insertions, 9 deletions
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());
}