From 4abaac6c5df21a68d1ace7bcaee1e016a9edd90f Mon Sep 17 00:00:00 2001 From: Li Zhineng Date: Wed, 2 Jul 2025 20:35:37 +0800 Subject: subprocedure by path name --- server.test.mjs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'server.test.mjs') diff --git a/server.test.mjs b/server.test.mjs index 259b913..1e44083 100644 --- a/server.test.mjs +++ b/server.test.mjs @@ -136,6 +136,12 @@ test('device registration endpoint returns bad request if missing encryption key assert.strictEqual(res.headers.get('content-type'), 'application/json') }) +test('device registration endpoint returns not found if path is not supported', async () => { + const params = new URLSearchParams({ path: 'eagle/GET/foo' }) + const res = await fetch(`${baseUrl}/eagle?${params.toString()}`) + assert.strictEqual(res.status, 404) +}) + test('exchange endpoint', async () => { const stubMacAddress = '0000000000' const stubKey = '00000000000000000000000000000000' -- cgit v1.2.3