summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
authorNayeem Rahman <nayeemrmn99@gmail.com>2020-11-22 13:06:51 +0000
committerGitHub <noreply@github.com>2020-11-22 14:06:51 +0100
commit14877f7fe21573e1ed0ce696a107543bbba995b2 (patch)
treeaf260fdab14b2afac2400341c536ea7d2dca0570 /cli/tests
parent686a17fc075ead774f5b692329d11e72139e3f02 (diff)
feat(unstable): Add deno test --no-run (#8093)
This commit adds new flag to "deno test" subcommand called "--no-run" that allows to preload, cache an type check.
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/067_test_no_run_type_error.out4
-rw-r--r--cli/tests/integration_tests.rs6
-rw-r--r--cli/tests/test_type_error/foo_test.ts1
3 files changed, 11 insertions, 0 deletions
diff --git a/cli/tests/067_test_no_run_type_error.out b/cli/tests/067_test_no_run_type_error.out
new file mode 100644
index 000000000..f67ee6647
--- /dev/null
+++ b/cli/tests/067_test_no_run_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 3618c2e77..17b9fbc1b 100644
--- a/cli/tests/integration_tests.rs
+++ b/cli/tests/integration_tests.rs
@@ -2185,6 +2185,12 @@ fn _066_prompt() {
util::test_pty(args, output, input);
}
+itest!(_067_test_no_run_type_error {
+ args: "test --unstable --no-run test_type_error",
+ output: "067_test_no_run_type_error.out",
+ exit_code: 1,
+});
+
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..68d1afccf
--- /dev/null
+++ b/cli/tests/test_type_error/foo_test.ts
@@ -0,0 +1 @@
+const a: string = 1;