summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAsher Gomez <ashersaupingomez@gmail.com>2024-04-21 11:58:59 +1000
committerGitHub <noreply@github.com>2024-04-21 01:58:59 +0000
commit98e2f6d50b6b0e077a1fae99ee77ed5ce7f33aef (patch)
tree705aaeb776265b947f42da636ceebf382f6b3943 /tests
parenta2bd1a724bf6539ef2f7c3682b36107aae95fa25 (diff)
FUTURE(ext/net): remove `Deno.ListenTlsOptions.(keyFile|certFile)` (#23271)
Towards #23089 --------- Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/specs/future/runtime_api/main.js13
-rw-r--r--tests/specs/future/runtime_api/main.out1
2 files changed, 14 insertions, 0 deletions
diff --git a/tests/specs/future/runtime_api/main.js b/tests/specs/future/runtime_api/main.js
index a79185e92..b44291218 100644
--- a/tests/specs/future/runtime_api/main.js
+++ b/tests/specs/future/runtime_api/main.js
@@ -92,6 +92,19 @@ try {
}
}
+// Note: this could throw with a `Deno.errors.NotFound` error if `keyFile` and
+// `certFile` were used.
+try {
+ Deno.listenTls({ port: tlsPort, keyFile: "foo", certFile: "foo" });
+} catch (error) {
+ if (
+ error instanceof Deno.errors.InvalidData &&
+ error.message ===
+ "Deno.listenTls requires a key: Error creating TLS certificate"
+ ) {
+ console.log("Deno.ListenTlsOptions.(keyFile|certFile) do nothing");
+ }
+}
console.log("Deno.customInspect is", Deno.customInspect);
self.close();
diff --git a/tests/specs/future/runtime_api/main.out b/tests/specs/future/runtime_api/main.out
index 1bc41c026..07b588495 100644
--- a/tests/specs/future/runtime_api/main.out
+++ b/tests/specs/future/runtime_api/main.out
@@ -34,4 +34,5 @@ Deno.TlsListener.prototype.rid is undefined
Deno.TlsConn.prototype.rid is undefined
Deno.FsWatcher.prototype.rid is undefined
Deno.FsFile constructor is illegal
+Deno.ListenTlsOptions.(keyFile|certFile) do nothing
Deno.customInspect is undefined