summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
authorNayeem Rahman <nayeemrmn99@gmail.com>2020-10-23 12:31:49 +0100
committerGitHub <noreply@github.com>2020-10-23 13:31:49 +0200
commitbe15cf285dbf3a7b3025d34cb80e87e54a55dd93 (patch)
treeae0ae0e1f4c71ed4f4d0cbdfc374ba1deebb07ac /cli/tests
parent29e05bb014015085615f648a31f180ed9dd49e5a (diff)
feat(cli): Add deno cache --test and --worker (#7920)
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/068_cache_test_type_error.out4
-rw-r--r--cli/tests/integration_tests.rs12
-rw-r--r--cli/tests/test_type_error/foo_test.ts2
3 files changed, 18 insertions, 0 deletions
diff --git a/cli/tests/068_cache_test_type_error.out b/cli/tests/068_cache_test_type_error.out
new file mode 100644
index 000000000..f67ee6647
--- /dev/null
+++ b/cli/tests/068_cache_test_type_error.out
@@ -0,0 +1,4 @@
+[WILDCARD]error: TS2322 [ERROR]: Type 'number' is not assignable to type 'string'.
+const a: string = 1;
+ ^
+ at [WILDCARD]foo_test.ts[WILDCARD]
diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs
index 11240e71b..b448379b9 100644
--- a/cli/tests/integration_tests.rs
+++ b/cli/tests/integration_tests.rs
@@ -2137,6 +2137,18 @@ fn _066_prompt() {
util::test_pty(args, output, input);
}
+itest!(_068_cache_test_type_error {
+ args: "cache --test=test_type_error",
+ output: "068_cache_test_type_error.out",
+ exit_code: 1,
+});
+
+itest!(_069_cache_worker {
+ args: "cache --worker subdir/worker_globals.ts",
+ output_str: Some("[WILDCARD]"),
+ exit_code: 0,
+});
+
itest!(_073_worker_error {
args: "run -A 073_worker_error.ts",
output: "073_worker_error.ts.out",
diff --git a/cli/tests/test_type_error/foo_test.ts b/cli/tests/test_type_error/foo_test.ts
new file mode 100644
index 000000000..229e74798
--- /dev/null
+++ b/cli/tests/test_type_error/foo_test.ts
@@ -0,0 +1,2 @@
+/* eslint-disable */
+const a: string = 1;