summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
authorGeert-Jan Zwiers <geertjanzwiers@protonmail.com>2023-03-26 16:55:58 +0200
committerGitHub <noreply@github.com>2023-03-26 14:55:58 +0000
commita29d88b43bdc3bf08a30fdb64d35beef8839f246 (patch)
tree89ca27e21576f410a7b980ddb04c48e63a9bc24d /cli/tests
parent701099b2a9ec64e6fad3b7ecfd78e8c7224ef83e (diff)
feat(bench): add `--no-run` flag (#18433)
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/integration/bench_tests.rs6
-rw-r--r--cli/tests/testdata/bench/no_run.out5
-rw-r--r--cli/tests/testdata/bench/no_run.ts2
3 files changed, 13 insertions, 0 deletions
diff --git a/cli/tests/integration/bench_tests.rs b/cli/tests/integration/bench_tests.rs
index e5174025e..16ac5852e 100644
--- a/cli/tests/integration/bench_tests.rs
+++ b/cli/tests/integration/bench_tests.rs
@@ -138,6 +138,12 @@ itest!(filter {
output: "bench/filter.out",
});
+itest!(no_run {
+ args: "bench --no-run bench/no_run.ts",
+ output: "bench/no_run.out",
+ exit_code: 1,
+});
+
itest!(no_prompt_by_default {
args: "bench --quiet bench/no_prompt_by_default.ts",
exit_code: 1,
diff --git a/cli/tests/testdata/bench/no_run.out b/cli/tests/testdata/bench/no_run.out
new file mode 100644
index 000000000..5d40f1d3b
--- /dev/null
+++ b/cli/tests/testdata/bench/no_run.out
@@ -0,0 +1,5 @@
+Check [WILDCARD]/bench/no_run.ts
+error: TS2322 [ERROR]: Type 'number' is not assignable to type 'string'.
+const _value: string = 1;
+ ~~~~~~
+ at [WILDCARD]/bench/no_run.ts:1:7
diff --git a/cli/tests/testdata/bench/no_run.ts b/cli/tests/testdata/bench/no_run.ts
new file mode 100644
index 000000000..c7a5dc1e8
--- /dev/null
+++ b/cli/tests/testdata/bench/no_run.ts
@@ -0,0 +1,2 @@
+const _value: string = 1;
+console.log("this should not be run");