From 14877f7fe21573e1ed0ce696a107543bbba995b2 Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Sun, 22 Nov 2020 13:06:51 +0000 Subject: 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. --- cli/tests/067_test_no_run_type_error.out | 4 ++++ cli/tests/integration_tests.rs | 6 ++++++ cli/tests/test_type_error/foo_test.ts | 1 + 3 files changed, 11 insertions(+) create mode 100644 cli/tests/067_test_no_run_type_error.out create mode 100644 cli/tests/test_type_error/foo_test.ts (limited to 'cli/tests') 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; -- cgit v1.2.3