summaryrefslogtreecommitdiff
path: root/cli/tests/testdata
diff options
context:
space:
mode:
authorBartek Iwańczuk <biwanczuk@gmail.com>2022-05-17 23:53:42 +0200
committerGitHub <noreply@github.com>2022-05-17 23:53:42 +0200
commit9a85a95c435968e5bdf6e71192be3ed239fd2205 (patch)
tree7c51e96bd0f6f7a2565f688bef85de82b5fdf790 /cli/tests/testdata
parent330c820ae8d7826dfe3d88c01ba07728121fa021 (diff)
feat: subcommands type-check only local files by default (#14623)
This commit changes default mode of type-checking to "local" and adds "--check" flag to following subcommands: - deno bench - deno bundle - deno cache - deno compile - deno eval - deno install - deno test
Diffstat (limited to 'cli/tests/testdata')
-rw-r--r--cli/tests/testdata/bench/check_local_by_default.out5
-rw-r--r--cli/tests/testdata/bench/check_local_by_default.ts3
-rw-r--r--cli/tests/testdata/bench/check_local_by_default2.out4
-rw-r--r--cli/tests/testdata/bench/check_local_by_default2.ts6
-rw-r--r--cli/tests/testdata/bundle/check_local_by_default.out6
-rw-r--r--cli/tests/testdata/bundle/check_local_by_default.ts3
-rw-r--r--cli/tests/testdata/bundle/check_local_by_default2.out4
-rw-r--r--cli/tests/testdata/bundle/check_local_by_default2.ts6
-rw-r--r--cli/tests/testdata/cache/check_local_by_default.out0
-rw-r--r--cli/tests/testdata/cache/check_local_by_default.ts3
-rw-r--r--cli/tests/testdata/cache/check_local_by_default2.out4
-rw-r--r--cli/tests/testdata/cache/check_local_by_default2.ts6
-rw-r--r--cli/tests/testdata/compile/check_local_by_default.ts3
-rw-r--r--cli/tests/testdata/compile/check_local_by_default2.ts6
-rw-r--r--cli/tests/testdata/eval/check_local_by_default.out1
-rw-r--r--cli/tests/testdata/eval/check_local_by_default2.out4
-rw-r--r--cli/tests/testdata/eval/check_local_by_default2.ts6
-rw-r--r--cli/tests/testdata/install/check_local_by_default.ts3
-rw-r--r--cli/tests/testdata/install/check_local_by_default2.ts6
-rw-r--r--cli/tests/testdata/test/check_local_by_default.out4
-rw-r--r--cli/tests/testdata/test/check_local_by_default.ts3
-rw-r--r--cli/tests/testdata/test/check_local_by_default2.out4
-rw-r--r--cli/tests/testdata/test/check_local_by_default2.ts6
23 files changed, 96 insertions, 0 deletions
diff --git a/cli/tests/testdata/bench/check_local_by_default.out b/cli/tests/testdata/bench/check_local_by_default.out
new file mode 100644
index 000000000..971c098bd
--- /dev/null
+++ b/cli/tests/testdata/bench/check_local_by_default.out
@@ -0,0 +1,5 @@
+[WILDCARD]
+
+[WILDCARD]/bench/check_local_by_default.ts
+benchmark time (avg) (min … max) p75 p99 p995
+------------------------------------------------- -----------------------------
diff --git a/cli/tests/testdata/bench/check_local_by_default.ts b/cli/tests/testdata/bench/check_local_by_default.ts
new file mode 100644
index 000000000..2ae8c2692
--- /dev/null
+++ b/cli/tests/testdata/bench/check_local_by_default.ts
@@ -0,0 +1,3 @@
+import * as a from "http://localhost:4545/subdir/type_error.ts";
+
+console.log(a.a);
diff --git a/cli/tests/testdata/bench/check_local_by_default2.out b/cli/tests/testdata/bench/check_local_by_default2.out
new file mode 100644
index 000000000..01aeda636
--- /dev/null
+++ b/cli/tests/testdata/bench/check_local_by_default2.out
@@ -0,0 +1,4 @@
+error: TS2322 [ERROR]: Type '12' is not assignable to type '"b"'.
+const b: "b" = 12;
+ ^
+ at [WILDCARD]bench/check_local_by_default2.ts:3:7
diff --git a/cli/tests/testdata/bench/check_local_by_default2.ts b/cli/tests/testdata/bench/check_local_by_default2.ts
new file mode 100644
index 000000000..5177ff944
--- /dev/null
+++ b/cli/tests/testdata/bench/check_local_by_default2.ts
@@ -0,0 +1,6 @@
+import * as a from "http://localhost:4545/subdir/type_error.ts";
+
+const b: "b" = 12;
+
+console.log(a.a);
+console.log(b);
diff --git a/cli/tests/testdata/bundle/check_local_by_default.out b/cli/tests/testdata/bundle/check_local_by_default.out
new file mode 100644
index 000000000..c4559d1fa
--- /dev/null
+++ b/cli/tests/testdata/bundle/check_local_by_default.out
@@ -0,0 +1,6 @@
+// deno-fmt-ignore-file
+// deno-lint-ignore-file
+// This code was bundled using `deno bundle` and it's not recommended to edit it manually
+
+console.log(12);
+
diff --git a/cli/tests/testdata/bundle/check_local_by_default.ts b/cli/tests/testdata/bundle/check_local_by_default.ts
new file mode 100644
index 000000000..2ae8c2692
--- /dev/null
+++ b/cli/tests/testdata/bundle/check_local_by_default.ts
@@ -0,0 +1,3 @@
+import * as a from "http://localhost:4545/subdir/type_error.ts";
+
+console.log(a.a);
diff --git a/cli/tests/testdata/bundle/check_local_by_default2.out b/cli/tests/testdata/bundle/check_local_by_default2.out
new file mode 100644
index 000000000..60f5760f8
--- /dev/null
+++ b/cli/tests/testdata/bundle/check_local_by_default2.out
@@ -0,0 +1,4 @@
+error: TS2322 [ERROR]: Type '12' is not assignable to type '"b"'.
+const b: "b" = 12;
+ ^
+ at [WILDCARD]bundle/check_local_by_default2.ts:3:7
diff --git a/cli/tests/testdata/bundle/check_local_by_default2.ts b/cli/tests/testdata/bundle/check_local_by_default2.ts
new file mode 100644
index 000000000..5177ff944
--- /dev/null
+++ b/cli/tests/testdata/bundle/check_local_by_default2.ts
@@ -0,0 +1,6 @@
+import * as a from "http://localhost:4545/subdir/type_error.ts";
+
+const b: "b" = 12;
+
+console.log(a.a);
+console.log(b);
diff --git a/cli/tests/testdata/cache/check_local_by_default.out b/cli/tests/testdata/cache/check_local_by_default.out
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/cli/tests/testdata/cache/check_local_by_default.out
diff --git a/cli/tests/testdata/cache/check_local_by_default.ts b/cli/tests/testdata/cache/check_local_by_default.ts
new file mode 100644
index 000000000..2ae8c2692
--- /dev/null
+++ b/cli/tests/testdata/cache/check_local_by_default.ts
@@ -0,0 +1,3 @@
+import * as a from "http://localhost:4545/subdir/type_error.ts";
+
+console.log(a.a);
diff --git a/cli/tests/testdata/cache/check_local_by_default2.out b/cli/tests/testdata/cache/check_local_by_default2.out
new file mode 100644
index 000000000..1367dc70e
--- /dev/null
+++ b/cli/tests/testdata/cache/check_local_by_default2.out
@@ -0,0 +1,4 @@
+error: TS2322 [ERROR]: Type '12' is not assignable to type '"b"'.
+const b: "b" = 12;
+ ^
+ at [WILDCARD]cache/check_local_by_default2.ts:3:7
diff --git a/cli/tests/testdata/cache/check_local_by_default2.ts b/cli/tests/testdata/cache/check_local_by_default2.ts
new file mode 100644
index 000000000..5177ff944
--- /dev/null
+++ b/cli/tests/testdata/cache/check_local_by_default2.ts
@@ -0,0 +1,6 @@
+import * as a from "http://localhost:4545/subdir/type_error.ts";
+
+const b: "b" = 12;
+
+console.log(a.a);
+console.log(b);
diff --git a/cli/tests/testdata/compile/check_local_by_default.ts b/cli/tests/testdata/compile/check_local_by_default.ts
new file mode 100644
index 000000000..2ae8c2692
--- /dev/null
+++ b/cli/tests/testdata/compile/check_local_by_default.ts
@@ -0,0 +1,3 @@
+import * as a from "http://localhost:4545/subdir/type_error.ts";
+
+console.log(a.a);
diff --git a/cli/tests/testdata/compile/check_local_by_default2.ts b/cli/tests/testdata/compile/check_local_by_default2.ts
new file mode 100644
index 000000000..5177ff944
--- /dev/null
+++ b/cli/tests/testdata/compile/check_local_by_default2.ts
@@ -0,0 +1,6 @@
+import * as a from "http://localhost:4545/subdir/type_error.ts";
+
+const b: "b" = 12;
+
+console.log(a.a);
+console.log(b);
diff --git a/cli/tests/testdata/eval/check_local_by_default.out b/cli/tests/testdata/eval/check_local_by_default.out
new file mode 100644
index 000000000..e3e1c694f
--- /dev/null
+++ b/cli/tests/testdata/eval/check_local_by_default.out
@@ -0,0 +1 @@
+Module { a: 12 }
diff --git a/cli/tests/testdata/eval/check_local_by_default2.out b/cli/tests/testdata/eval/check_local_by_default2.out
new file mode 100644
index 000000000..072068827
--- /dev/null
+++ b/cli/tests/testdata/eval/check_local_by_default2.out
@@ -0,0 +1,4 @@
+error: TS2322 [ERROR]: Type '12' is not assignable to type '"b"'.
+const b: "b" = 12;
+ ^
+ at [WILDCARD]eval/check_local_by_default2.ts:3:7
diff --git a/cli/tests/testdata/eval/check_local_by_default2.ts b/cli/tests/testdata/eval/check_local_by_default2.ts
new file mode 100644
index 000000000..5177ff944
--- /dev/null
+++ b/cli/tests/testdata/eval/check_local_by_default2.ts
@@ -0,0 +1,6 @@
+import * as a from "http://localhost:4545/subdir/type_error.ts";
+
+const b: "b" = 12;
+
+console.log(a.a);
+console.log(b);
diff --git a/cli/tests/testdata/install/check_local_by_default.ts b/cli/tests/testdata/install/check_local_by_default.ts
new file mode 100644
index 000000000..2ae8c2692
--- /dev/null
+++ b/cli/tests/testdata/install/check_local_by_default.ts
@@ -0,0 +1,3 @@
+import * as a from "http://localhost:4545/subdir/type_error.ts";
+
+console.log(a.a);
diff --git a/cli/tests/testdata/install/check_local_by_default2.ts b/cli/tests/testdata/install/check_local_by_default2.ts
new file mode 100644
index 000000000..5177ff944
--- /dev/null
+++ b/cli/tests/testdata/install/check_local_by_default2.ts
@@ -0,0 +1,6 @@
+import * as a from "http://localhost:4545/subdir/type_error.ts";
+
+const b: "b" = 12;
+
+console.log(a.a);
+console.log(b);
diff --git a/cli/tests/testdata/test/check_local_by_default.out b/cli/tests/testdata/test/check_local_by_default.out
new file mode 100644
index 000000000..29c1bbc42
--- /dev/null
+++ b/cli/tests/testdata/test/check_local_by_default.out
@@ -0,0 +1,4 @@
+running 0 tests from ./test/check_local_by_default.ts
+
+test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])
+
diff --git a/cli/tests/testdata/test/check_local_by_default.ts b/cli/tests/testdata/test/check_local_by_default.ts
new file mode 100644
index 000000000..2ae8c2692
--- /dev/null
+++ b/cli/tests/testdata/test/check_local_by_default.ts
@@ -0,0 +1,3 @@
+import * as a from "http://localhost:4545/subdir/type_error.ts";
+
+console.log(a.a);
diff --git a/cli/tests/testdata/test/check_local_by_default2.out b/cli/tests/testdata/test/check_local_by_default2.out
new file mode 100644
index 000000000..b933ac483
--- /dev/null
+++ b/cli/tests/testdata/test/check_local_by_default2.out
@@ -0,0 +1,4 @@
+error: TS2322 [ERROR]: Type '12' is not assignable to type '"b"'.
+const b: "b" = 12;
+ ^
+ at [WILDCARD]test/check_local_by_default2.ts:3:7
diff --git a/cli/tests/testdata/test/check_local_by_default2.ts b/cli/tests/testdata/test/check_local_by_default2.ts
new file mode 100644
index 000000000..5177ff944
--- /dev/null
+++ b/cli/tests/testdata/test/check_local_by_default2.ts
@@ -0,0 +1,6 @@
+import * as a from "http://localhost:4545/subdir/type_error.ts";
+
+const b: "b" = 12;
+
+console.log(a.a);
+console.log(b);