diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2022-04-11 01:12:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-11 01:12:51 +0200 |
commit | 8ae17026cbb30ab23fd79ac5cf5c207af5ad90a3 (patch) | |
tree | d627be6104c0903b36ac38c6b56c2603469bbfec /cli/tests/integration/inspector_tests.rs | |
parent | a4eee007ef28f918db9165c52a19bc30bd65bad3 (diff) |
feat: Add "deno check" subcommand for type checking (#14072)
This commit adds new "deno check" subcommand.
Currently it is an alias for "deno cache" with the difference that remote
modules don't emit TS diagnostics by default.
Prints warning for "deno run" subcommand if "--check" flag is not present
and there's no "--no-check" flag. Adds "DENO_FUTURE_CHECK" env
variable that allows to opt into new behavior now.
Diffstat (limited to 'cli/tests/integration/inspector_tests.rs')
-rw-r--r-- | cli/tests/integration/inspector_tests.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/cli/tests/integration/inspector_tests.rs b/cli/tests/integration/inspector_tests.rs index 71ecaf22e..86a5d4264 100644 --- a/cli/tests/integration/inspector_tests.rs +++ b/cli/tests/integration/inspector_tests.rs @@ -142,6 +142,7 @@ async fn assert_inspector_messages( async fn inspector_connect() { let script = util::testdata_path().join("inspector/inspector1.js"); let mut child = util::deno_cmd() + .env("DENO_FUTURE_CHECK", "1") .arg("run") .arg(inspect_flag_with_unique_port("--inspect")) .arg(script) @@ -167,6 +168,7 @@ async fn inspector_connect() { async fn inspector_break_on_first_line() { let script = util::testdata_path().join("inspector/inspector2.js"); let mut child = util::deno_cmd() + .env("DENO_FUTURE_CHECK", "1") .arg("run") .arg(inspect_flag_with_unique_port("--inspect-brk")) .arg(script) @@ -257,6 +259,7 @@ async fn inspector_break_on_first_line() { async fn inspector_pause() { let script = util::testdata_path().join("inspector/inspector1.js"); let mut child = util::deno_cmd() + .env("DENO_FUTURE_CHECK", "1") .arg("run") .arg(inspect_flag_with_unique_port("--inspect")) .arg(script) @@ -327,6 +330,7 @@ async fn inspector_port_collision() { let inspect_flag = inspect_flag_with_unique_port("--inspect"); let mut child1 = util::deno_cmd() + .env("DENO_FUTURE_CHECK", "1") .arg("run") .arg(&inspect_flag) .arg(script.clone()) @@ -341,6 +345,7 @@ async fn inspector_port_collision() { let _ = extract_ws_url_from_stderr(&mut stderr_1_lines); let mut child2 = util::deno_cmd() + .env("DENO_FUTURE_CHECK", "1") .arg("run") .arg(&inspect_flag) .arg(script) @@ -365,6 +370,7 @@ async fn inspector_port_collision() { async fn inspector_does_not_hang() { let script = util::testdata_path().join("inspector/inspector3.js"); let mut child = util::deno_cmd() + .env("DENO_FUTURE_CHECK", "1") .arg("run") .arg(inspect_flag_with_unique_port("--inspect-brk")) .env("NO_COLOR", "1") @@ -476,6 +482,7 @@ async fn inspector_does_not_hang() { async fn inspector_without_brk_runs_code() { let script = util::testdata_path().join("inspector/inspector4.js"); let mut child = util::deno_cmd() + .env("DENO_FUTURE_CHECK", "1") .arg("run") .arg(inspect_flag_with_unique_port("--inspect")) .arg(script) @@ -603,6 +610,7 @@ async fn inspector_runtime_evaluate_does_not_crash() { async fn inspector_json() { let script = util::testdata_path().join("inspector/inspector1.js"); let mut child = util::deno_cmd() + .env("DENO_FUTURE_CHECK", "1") .arg("run") .arg(inspect_flag_with_unique_port("--inspect")) .arg(script) @@ -632,6 +640,7 @@ async fn inspector_json() { async fn inspector_json_list() { let script = util::testdata_path().join("inspector/inspector1.js"); let mut child = util::deno_cmd() + .env("DENO_FUTURE_CHECK", "1") .arg("run") .arg(inspect_flag_with_unique_port("--inspect")) .arg(script) @@ -663,6 +672,7 @@ async fn inspector_connect_non_ws() { // Verify we don't panic if non-WS connection is being established let script = util::testdata_path().join("inspector/inspector1.js"); let mut child = util::deno_cmd() + .env("DENO_FUTURE_CHECK", "1") .arg("run") .arg(inspect_flag_with_unique_port("--inspect")) .arg(script) @@ -688,6 +698,7 @@ async fn inspector_connect_non_ws() { async fn inspector_break_on_first_line_in_test() { let script = util::testdata_path().join("inspector/inspector_test.js"); let mut child = util::deno_cmd() + .env("DENO_FUTURE_CHECK", "1") .arg("test") .arg(inspect_flag_with_unique_port("--inspect-brk")) .arg(script) @@ -782,7 +793,9 @@ async fn inspector_break_on_first_line_in_test() { async fn inspector_with_ts_files() { let script = util::testdata_path().join("inspector/test.ts"); let mut child = util::deno_cmd() + .env("DENO_FUTURE_CHECK", "1") .arg("run") + .arg("--check") .arg(inspect_flag_with_unique_port("--inspect-brk")) .arg(script) .stdout(std::process::Stdio::piped()) @@ -907,6 +920,7 @@ async fn inspector_with_ts_files() { async fn inspector_memory() { let script = util::testdata_path().join("inspector/memory.js"); let mut child = util::deno_cmd() + .env("DENO_FUTURE_CHECK", "1") .arg("run") .arg(inspect_flag_with_unique_port("--inspect-brk")) .arg(script) @@ -1021,6 +1035,7 @@ async fn inspector_memory() { async fn inspector_profile() { let script = util::testdata_path().join("inspector/memory.js"); let mut child = util::deno_cmd() + .env("DENO_FUTURE_CHECK", "1") .arg("run") .arg(inspect_flag_with_unique_port("--inspect-brk")) .arg(script) |