summaryrefslogtreecommitdiff
path: root/tests/specs/check
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-04-29 10:08:27 -0400
committerGitHub <noreply@github.com>2024-04-29 10:08:27 -0400
commitda52058a945999d486b07700d2834f027a65947c (patch)
treeb6031c274cbc36dcefc6d681473e366cdb208c89 /tests/specs/check
parentb02ffec37c73be8a73b95b33b32efa693e84e01b (diff)
chore: migrate bench, publish, and more itests to spec tests (#23584)
Diffstat (limited to 'tests/specs/check')
-rw-r--r--tests/specs/check/check_types_dts/__test__.jsonc5
-rw-r--r--tests/specs/check/check_types_dts/deno.json7
-rw-r--r--tests/specs/check/check_types_dts/main.out1
-rw-r--r--tests/specs/check/check_types_dts/main.ts3
-rw-r--r--tests/specs/check/check_types_dts/types.d.ts3
-rw-r--r--tests/specs/check/check_with_excluded_file_specified/__test__.jsonc4
-rw-r--r--tests/specs/check/check_with_excluded_file_specified/check.out1
-rw-r--r--tests/specs/check/check_with_excluded_file_specified/deno.json6
-rw-r--r--tests/specs/check/check_with_excluded_file_specified/lib/types.d.ts2
-rw-r--r--tests/specs/check/extensionless/__test__.jsonc4
-rw-r--r--tests/specs/check/extensionless/check.out2
-rw-r--r--tests/specs/check/random_extension/__test__.jsonc4
-rw-r--r--tests/specs/check/random_extension/output.out2
-rw-r--r--tests/specs/check/with_bare_import/095_cache_with_bare_import.ts1
-rw-r--r--tests/specs/check/with_bare_import/095_cache_with_bare_import.ts.out2
-rw-r--r--tests/specs/check/with_bare_import/__test__.jsonc5
16 files changed, 52 insertions, 0 deletions
diff --git a/tests/specs/check/check_types_dts/__test__.jsonc b/tests/specs/check/check_types_dts/__test__.jsonc
new file mode 100644
index 000000000..7f620daa2
--- /dev/null
+++ b/tests/specs/check/check_types_dts/__test__.jsonc
@@ -0,0 +1,5 @@
+{
+ "args": "check main.ts",
+ "output": "main.out",
+ "exitCode": 0
+}
diff --git a/tests/specs/check/check_types_dts/deno.json b/tests/specs/check/check_types_dts/deno.json
new file mode 100644
index 000000000..85f1549e0
--- /dev/null
+++ b/tests/specs/check/check_types_dts/deno.json
@@ -0,0 +1,7 @@
+{
+ "compilerOptions": {
+ "types": [
+ "./types.d.ts"
+ ]
+ }
+}
diff --git a/tests/specs/check/check_types_dts/main.out b/tests/specs/check/check_types_dts/main.out
new file mode 100644
index 000000000..b8fb00c4f
--- /dev/null
+++ b/tests/specs/check/check_types_dts/main.out
@@ -0,0 +1 @@
+Check file:///[WILDCARD]/main.ts
diff --git a/tests/specs/check/check_types_dts/main.ts b/tests/specs/check/check_types_dts/main.ts
new file mode 100644
index 000000000..ca375a094
--- /dev/null
+++ b/tests/specs/check/check_types_dts/main.ts
@@ -0,0 +1,3 @@
+console.log("Hello world!");
+
+test.test();
diff --git a/tests/specs/check/check_types_dts/types.d.ts b/tests/specs/check/check_types_dts/types.d.ts
new file mode 100644
index 000000000..141c2a3d3
--- /dev/null
+++ b/tests/specs/check/check_types_dts/types.d.ts
@@ -0,0 +1,3 @@
+declare class test {
+ static test(): void;
+}
diff --git a/tests/specs/check/check_with_excluded_file_specified/__test__.jsonc b/tests/specs/check/check_with_excluded_file_specified/__test__.jsonc
new file mode 100644
index 000000000..212ab8fb3
--- /dev/null
+++ b/tests/specs/check/check_with_excluded_file_specified/__test__.jsonc
@@ -0,0 +1,4 @@
+{
+ "args": "check lib/types.d.ts",
+ "output": "check.out"
+}
diff --git a/tests/specs/check/check_with_excluded_file_specified/check.out b/tests/specs/check/check_with_excluded_file_specified/check.out
new file mode 100644
index 000000000..2bc26aaaf
--- /dev/null
+++ b/tests/specs/check/check_with_excluded_file_specified/check.out
@@ -0,0 +1 @@
+Warning No matching files found.
diff --git a/tests/specs/check/check_with_excluded_file_specified/deno.json b/tests/specs/check/check_with_excluded_file_specified/deno.json
new file mode 100644
index 000000000..039be18df
--- /dev/null
+++ b/tests/specs/check/check_with_excluded_file_specified/deno.json
@@ -0,0 +1,6 @@
+{
+ "compilerOptions": {
+ "types": ["./lib/types.d.ts"]
+ },
+ "exclude": ["lib"]
+}
diff --git a/tests/specs/check/check_with_excluded_file_specified/lib/types.d.ts b/tests/specs/check/check_with_excluded_file_specified/lib/types.d.ts
new file mode 100644
index 000000000..a02ad0cbe
--- /dev/null
+++ b/tests/specs/check/check_with_excluded_file_specified/lib/types.d.ts
@@ -0,0 +1,2 @@
+// deno-lint-ignore-file
+declare var test: number;
diff --git a/tests/specs/check/extensionless/__test__.jsonc b/tests/specs/check/extensionless/__test__.jsonc
new file mode 100644
index 000000000..670680b7d
--- /dev/null
+++ b/tests/specs/check/extensionless/__test__.jsonc
@@ -0,0 +1,4 @@
+{
+ "args": "check --reload --all http://localhost:4545/subdir/no_js_ext",
+ "output": "check.out"
+}
diff --git a/tests/specs/check/extensionless/check.out b/tests/specs/check/extensionless/check.out
new file mode 100644
index 000000000..3694c67cb
--- /dev/null
+++ b/tests/specs/check/extensionless/check.out
@@ -0,0 +1,2 @@
+[WILDCARD]
+Check http://localhost:4545/subdir/no_js_ext
diff --git a/tests/specs/check/random_extension/__test__.jsonc b/tests/specs/check/random_extension/__test__.jsonc
new file mode 100644
index 000000000..f504c1d2b
--- /dev/null
+++ b/tests/specs/check/random_extension/__test__.jsonc
@@ -0,0 +1,4 @@
+{
+ "args": "check --reload --all http://localhost:4545/subdir/no_js_ext@1.0.0",
+ "output": "output.out"
+}
diff --git a/tests/specs/check/random_extension/output.out b/tests/specs/check/random_extension/output.out
new file mode 100644
index 000000000..745a2e0e3
--- /dev/null
+++ b/tests/specs/check/random_extension/output.out
@@ -0,0 +1,2 @@
+[WILDCARD]
+Check http://localhost:4545/subdir/no_js_ext@1.0.0
diff --git a/tests/specs/check/with_bare_import/095_cache_with_bare_import.ts b/tests/specs/check/with_bare_import/095_cache_with_bare_import.ts
new file mode 100644
index 000000000..c0748305d
--- /dev/null
+++ b/tests/specs/check/with_bare_import/095_cache_with_bare_import.ts
@@ -0,0 +1 @@
+import "foo";
diff --git a/tests/specs/check/with_bare_import/095_cache_with_bare_import.ts.out b/tests/specs/check/with_bare_import/095_cache_with_bare_import.ts.out
new file mode 100644
index 000000000..2668a6e08
--- /dev/null
+++ b/tests/specs/check/with_bare_import/095_cache_with_bare_import.ts.out
@@ -0,0 +1,2 @@
+[WILDCARD]error: Relative import path "foo" not prefixed with / or ./ or ../
+ at file:///[WILDCARD]/095_cache_with_bare_import.ts:[WILDCARD]
diff --git a/tests/specs/check/with_bare_import/__test__.jsonc b/tests/specs/check/with_bare_import/__test__.jsonc
new file mode 100644
index 000000000..c32a66ad2
--- /dev/null
+++ b/tests/specs/check/with_bare_import/__test__.jsonc
@@ -0,0 +1,5 @@
+{
+ "args": "check 095_cache_with_bare_import.ts",
+ "output": "095_cache_with_bare_import.ts.out",
+ "exitCode": 1
+}