From be15cf285dbf3a7b3025d34cb80e87e54a55dd93 Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Fri, 23 Oct 2020 12:31:49 +0100 Subject: feat(cli): Add deno cache --test and --worker (#7920) --- cli/tests/068_cache_test_type_error.out | 4 ++++ cli/tests/integration_tests.rs | 12 ++++++++++++ cli/tests/test_type_error/foo_test.ts | 2 ++ 3 files changed, 18 insertions(+) create mode 100644 cli/tests/068_cache_test_type_error.out create mode 100644 cli/tests/test_type_error/foo_test.ts (limited to 'cli/tests') 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; -- cgit v1.2.3