summaryrefslogtreecommitdiff
path: root/tests/testdata/serve
diff options
context:
space:
mode:
authorMarvin Hagemeister <marvin@deno.com>2024-05-17 14:35:19 +0200
committerGitHub <noreply@github.com>2024-05-17 18:05:19 +0530
commit812f2e4c22182fdbaf783dba3cc9d178783eced7 (patch)
tree5c0f7123981248b088b7bf007bca0cb9748e5699 /tests/testdata/serve
parent20cb0e8863beb0d709adc2f41905ce3f1f465447 (diff)
fix: serve handler error with 0 arguments (#23652)
Fixes https://github.com/denoland/deno/issues/23651 Co-authored-by: Satya Rohith <me@satyarohith.com>
Diffstat (limited to 'tests/testdata/serve')
-rw-r--r--tests/testdata/serve/no_args.ts5
-rw-r--r--tests/testdata/serve/port_0.ts5
2 files changed, 10 insertions, 0 deletions
diff --git a/tests/testdata/serve/no_args.ts b/tests/testdata/serve/no_args.ts
new file mode 100644
index 000000000..891ddea67
--- /dev/null
+++ b/tests/testdata/serve/no_args.ts
@@ -0,0 +1,5 @@
+export default {
+ fetch() {
+ return new Response("deno serve with no args in fetch() works!");
+ },
+};
diff --git a/tests/testdata/serve/port_0.ts b/tests/testdata/serve/port_0.ts
new file mode 100644
index 000000000..cdd8476eb
--- /dev/null
+++ b/tests/testdata/serve/port_0.ts
@@ -0,0 +1,5 @@
+export default {
+ fetch(_req: Request) {
+ return new Response("deno serve --port 0 works!");
+ },
+};