summaryrefslogtreecommitdiff
path: root/cli/tests/integration/check_tests.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2022-04-11 01:12:51 +0200
committerGitHub <noreply@github.com>2022-04-11 01:12:51 +0200
commit8ae17026cbb30ab23fd79ac5cf5c207af5ad90a3 (patch)
treed627be6104c0903b36ac38c6b56c2603469bbfec /cli/tests/integration/check_tests.rs
parenta4eee007ef28f918db9165c52a19bc30bd65bad3 (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/check_tests.rs')
-rw-r--r--cli/tests/integration/check_tests.rs34
1 files changed, 34 insertions, 0 deletions
diff --git a/cli/tests/integration/check_tests.rs b/cli/tests/integration/check_tests.rs
new file mode 100644
index 000000000..f605a733a
--- /dev/null
+++ b/cli/tests/integration/check_tests.rs
@@ -0,0 +1,34 @@
+// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
+
+use crate::itest;
+
+itest!(_095_check_with_bare_import {
+ args: "check 095_cache_with_bare_import.ts",
+ output: "095_cache_with_bare_import.ts.out",
+ exit_code: 1,
+});
+
+itest!(check_extensionless {
+ args: "check --reload http://localhost:4545/subdir/no_js_ext",
+ output: "cache_extensionless.out",
+ http_server: true,
+});
+
+itest!(check_random_extension {
+ args: "check --reload http://localhost:4545/subdir/no_js_ext@1.0.0",
+ output: "cache_random_extension.out",
+ http_server: true,
+});
+
+itest!(check_all {
+ args: "check --quiet --remote check_all.ts",
+ output: "check_all.out",
+ http_server: true,
+ exit_code: 1,
+});
+
+itest!(check_all_local {
+ args: "check --quiet check_all.ts",
+ output_str: Some(""),
+ http_server: true,
+});