summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/integration/run_tests.rs7
-rw-r--r--tests/specs/run/unstable/__test__.jsonc34
-rw-r--r--tests/specs/run/unstable/broadcast_channel.out7
-rw-r--r--tests/specs/run/unstable/broadcast_channel.ts1
-rw-r--r--tests/specs/run/unstable/cron.out7
-rw-r--r--tests/specs/run/unstable/cron.ts1
-rw-r--r--tests/specs/run/unstable/http.out7
-rw-r--r--tests/specs/run/unstable/http.ts1
-rw-r--r--tests/specs/run/unstable/http_wss.out7
-rw-r--r--tests/specs/run/unstable/http_wss.ts1
-rw-r--r--tests/specs/run/unstable/kv.out7
-rw-r--r--tests/specs/run/unstable/kv.ts1
-rw-r--r--tests/specs/run/unstable/temporal.out7
-rw-r--r--tests/specs/run/unstable/temporal.ts (renamed from tests/testdata/run/unstable_temporal_api/missing_flag.js)0
-rw-r--r--tests/testdata/run/unstable_temporal_api/missing_flag.out4
15 files changed, 81 insertions, 11 deletions
diff --git a/tests/integration/run_tests.rs b/tests/integration/run_tests.rs
index 16faba438..301283e85 100644
--- a/tests/integration/run_tests.rs
+++ b/tests/integration/run_tests.rs
@@ -4811,13 +4811,6 @@ itest!(unstable_temporal_api_config_file {
exit_code: 0,
});
-itest!(unstable_temporal_api_missing_flag {
- args: "run --no-config run/unstable_temporal_api/missing_flag.js",
- output: "run/unstable_temporal_api/missing_flag.out",
- http_server: false,
- exit_code: 1,
-});
-
// TODO(bartlomieju): temporary disabled
// itest!(warn_on_deprecated_api {
// args: "run -A run/warn_on_deprecated_api/main.js",
diff --git a/tests/specs/run/unstable/__test__.jsonc b/tests/specs/run/unstable/__test__.jsonc
new file mode 100644
index 000000000..5748c5461
--- /dev/null
+++ b/tests/specs/run/unstable/__test__.jsonc
@@ -0,0 +1,34 @@
+{
+ "tests": {
+ "broadcast_channel": {
+ "args": "run broadcast_channel.ts",
+ "exitCode": 1,
+ "output": "broadcast_channel.out"
+ },
+ "cron": {
+ "args": "run cron.ts",
+ "exitCode": 1,
+ "output": "cron.out"
+ },
+ "http": {
+ "args": "run http.ts",
+ "exitCode": 1,
+ "output": "http.out"
+ },
+ "http_wss": {
+ "args": "run http_wss.ts",
+ "exitCode": 1,
+ "output": "http_wss.out"
+ },
+ "kv": {
+ "args": "run kv.ts",
+ "exitCode": 1,
+ "output": "kv.out"
+ },
+ "temporal": {
+ "args": "run temporal.ts",
+ "exitCode": 1,
+ "output": "temporal.out"
+ }
+ }
+}
diff --git a/tests/specs/run/unstable/broadcast_channel.out b/tests/specs/run/unstable/broadcast_channel.out
new file mode 100644
index 000000000..8a9a09ef2
--- /dev/null
+++ b/tests/specs/run/unstable/broadcast_channel.out
@@ -0,0 +1,7 @@
+error: Uncaught (in promise) ReferenceError: BroadcastChannel is not defined
+new BroadcastChannel("hello");
+^
+ at [WILDCARD]broadcast_channel.ts:1:1
+
+ info: BroadcastChannel is an unstable API.
+ hint: Run again with `--unstable-broadcast-channel` flag to enable this API.
diff --git a/tests/specs/run/unstable/broadcast_channel.ts b/tests/specs/run/unstable/broadcast_channel.ts
new file mode 100644
index 000000000..5fcbc34b5
--- /dev/null
+++ b/tests/specs/run/unstable/broadcast_channel.ts
@@ -0,0 +1 @@
+new BroadcastChannel("hello");
diff --git a/tests/specs/run/unstable/cron.out b/tests/specs/run/unstable/cron.out
new file mode 100644
index 000000000..76558bb38
--- /dev/null
+++ b/tests/specs/run/unstable/cron.out
@@ -0,0 +1,7 @@
+error: Uncaught (in promise) TypeError: Deno.cron is not a function
+Deno.cron();
+ ^
+ at [WILDCARD]cron.ts:1:6
+
+ info: Deno.cron() is an unstable API.
+ hint: Run again with `--unstable-cron` flag to enable this API.
diff --git a/tests/specs/run/unstable/cron.ts b/tests/specs/run/unstable/cron.ts
new file mode 100644
index 000000000..8ec4f21ea
--- /dev/null
+++ b/tests/specs/run/unstable/cron.ts
@@ -0,0 +1 @@
+Deno.cron();
diff --git a/tests/specs/run/unstable/http.out b/tests/specs/run/unstable/http.out
new file mode 100644
index 000000000..55e143c25
--- /dev/null
+++ b/tests/specs/run/unstable/http.out
@@ -0,0 +1,7 @@
+error: Uncaught (in promise) TypeError: Deno.createHttpClient is not a function
+Deno.createHttpClient();
+ ^
+ at [WILDCARD]http.ts:1:6
+
+ info: Deno.createHttpClient() is an unstable API.
+ hint: Run again with `--unstable-http` flag to enable this API.
diff --git a/tests/specs/run/unstable/http.ts b/tests/specs/run/unstable/http.ts
new file mode 100644
index 000000000..568d6a7cc
--- /dev/null
+++ b/tests/specs/run/unstable/http.ts
@@ -0,0 +1 @@
+Deno.createHttpClient();
diff --git a/tests/specs/run/unstable/http_wss.out b/tests/specs/run/unstable/http_wss.out
new file mode 100644
index 000000000..f62deaee8
--- /dev/null
+++ b/tests/specs/run/unstable/http_wss.out
@@ -0,0 +1,7 @@
+error: Uncaught (in promise) ReferenceError: WebSocketStream is not defined
+const wss = new WebSocketStream("ws://127.0.0.1:4513");
+ ^
+ at [WILDCARD]http_wss.ts:1:13
+
+ info: new WebSocketStream() is an unstable API.
+ hint: Run again with `--unstable-net` flag to enable this API.
diff --git a/tests/specs/run/unstable/http_wss.ts b/tests/specs/run/unstable/http_wss.ts
new file mode 100644
index 000000000..f4885f20f
--- /dev/null
+++ b/tests/specs/run/unstable/http_wss.ts
@@ -0,0 +1 @@
+const wss = new WebSocketStream("ws://127.0.0.1:4513");
diff --git a/tests/specs/run/unstable/kv.out b/tests/specs/run/unstable/kv.out
new file mode 100644
index 000000000..d0916604c
--- /dev/null
+++ b/tests/specs/run/unstable/kv.out
@@ -0,0 +1,7 @@
+error: Uncaught (in promise) TypeError: Deno.openKv is not a function
+const db = await Deno.openKv();
+ ^
+ at [WILDCARD]kv.ts:1:23
+
+ info: Deno.openKv() is an unstable API.
+ hint: Run again with `--unstable-kv` flag to enable this API.
diff --git a/tests/specs/run/unstable/kv.ts b/tests/specs/run/unstable/kv.ts
new file mode 100644
index 000000000..591bc3e37
--- /dev/null
+++ b/tests/specs/run/unstable/kv.ts
@@ -0,0 +1 @@
+const db = await Deno.openKv();
diff --git a/tests/specs/run/unstable/temporal.out b/tests/specs/run/unstable/temporal.out
new file mode 100644
index 000000000..f29f9acf8
--- /dev/null
+++ b/tests/specs/run/unstable/temporal.out
@@ -0,0 +1,7 @@
+error: Uncaught (in promise) ReferenceError: Temporal is not defined
+Temporal.Now.instant();
+^
+ at [WILDCARD]temporal.ts:1:1
+
+ info: Temporal is an unstable API.
+ hint: Run again with `--unstable-temporal` flag to enable this API.
diff --git a/tests/testdata/run/unstable_temporal_api/missing_flag.js b/tests/specs/run/unstable/temporal.ts
index 92aed7931..92aed7931 100644
--- a/tests/testdata/run/unstable_temporal_api/missing_flag.js
+++ b/tests/specs/run/unstable/temporal.ts
diff --git a/tests/testdata/run/unstable_temporal_api/missing_flag.out b/tests/testdata/run/unstable_temporal_api/missing_flag.out
deleted file mode 100644
index 8f8e23e70..000000000
--- a/tests/testdata/run/unstable_temporal_api/missing_flag.out
+++ /dev/null
@@ -1,4 +0,0 @@
-error: Uncaught (in promise) ReferenceError: Temporal is not defined
-Temporal.Now.instant();
-^
- at [WILDCARD]missing_flag.js:1:1