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/bundle_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/bundle_tests.rs')
-rw-r--r-- | cli/tests/integration/bundle_tests.rs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/cli/tests/integration/bundle_tests.rs b/cli/tests/integration/bundle_tests.rs index bb2489e03..e1a75f18d 100644 --- a/cli/tests/integration/bundle_tests.rs +++ b/cli/tests/integration/bundle_tests.rs @@ -34,6 +34,7 @@ fn bundle_exports() { let output = util::deno_cmd() .current_dir(util::testdata_path()) + .env("DENO_FUTURE_CHECK", "1") .arg("run") .arg(&test) .output() @@ -56,7 +57,6 @@ fn bundle_exports_no_check() { let mut deno = util::deno_cmd() .current_dir(util::testdata_path()) .arg("bundle") - .arg("--no-check") .arg(mod1) .arg(&bundle) .spawn() @@ -77,6 +77,7 @@ fn bundle_exports_no_check() { let output = util::deno_cmd() .current_dir(util::testdata_path()) + .env("DENO_FUTURE_CHECK", "1") .arg("run") .arg(&test) .output() @@ -109,6 +110,7 @@ fn bundle_circular() { let output = util::deno_cmd() .current_dir(util::testdata_path()) + .env("DENO_FUTURE_CHECK", "1") .arg("run") .arg(&bundle) .output() @@ -141,6 +143,7 @@ fn bundle_single_module() { let output = util::deno_cmd() .current_dir(util::testdata_path()) + .env("DENO_FUTURE_CHECK", "1") .arg("run") .arg(&bundle) .output() @@ -183,6 +186,7 @@ fn bundle_tla() { let output = util::deno_cmd() .current_dir(util::testdata_path()) + .env("DENO_FUTURE_CHECK", "1") .arg("run") .arg(&test) .output() @@ -215,6 +219,7 @@ fn bundle_js() { let output = util::deno_cmd() .current_dir(util::testdata_path()) + .env("DENO_FUTURE_CHECK", "1") .arg("run") .arg(&bundle) .output() @@ -289,7 +294,9 @@ fn bundle_import_map() { let output = util::deno_cmd() .current_dir(util::testdata_path()) + .env("DENO_FUTURE_CHECK", "1") .arg("run") + .arg("--check") .arg(&test) .output() .unwrap(); @@ -311,7 +318,6 @@ fn bundle_import_map_no_check() { let mut deno = util::deno_cmd() .current_dir(util::testdata_path()) .arg("bundle") - .arg("--no-check") .arg("--import-map") .arg(import_map_path) .arg(import) @@ -334,6 +340,7 @@ fn bundle_import_map_no_check() { let output = util::deno_cmd() .current_dir(util::testdata_path()) + .env("DENO_FUTURE_CHECK", "1") .arg("run") .arg(&test) .output() @@ -366,6 +373,7 @@ fn bundle_json_module() { let output = util::deno_cmd() .current_dir(util::testdata_path()) + .env("DENO_FUTURE_CHECK", "1") .arg("run") .arg(&bundle) .output() @@ -398,6 +406,7 @@ fn bundle_json_module_escape_sub() { let output = util::deno_cmd() .current_dir(util::testdata_path()) + .env("DENO_FUTURE_CHECK", "1") .arg("run") .arg(&bundle) .output() |