diff options
| author | Li Zhineng <[email protected]> | 2025-07-02 20:57:59 +0800 |
|---|---|---|
| committer | Li Zhineng <[email protected]> | 2025-07-02 20:57:59 +0800 |
| commit | 5570c76f16f8069f3a81044784842f6dbd1aaf66 (patch) | |
| tree | b341fbcfa0058b6d22330dc6493fafb4a5345f53 /server.test.mjs | |
| parent | fd5876743c2070a5259c36110e7e02f80ed80458 (diff) | |
| download | server-5570c76f16f8069f3a81044784842f6dbd1aaf66.tar.gz server-5570c76f16f8069f3a81044784842f6dbd1aaf66.zip | |
stub eagle online handler
Diffstat (limited to 'server.test.mjs')
| -rw-r--r-- | server.test.mjs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/server.test.mjs b/server.test.mjs index 1e44083..619d29f 100644 --- a/server.test.mjs +++ b/server.test.mjs @@ -142,6 +142,19 @@ test('device registration endpoint returns not found if path is not supported', assert.strictEqual(res.status, 404) }) +test('device status endpoint', async () => { + const params = new URLSearchParams({ + source: 5, + reqid: '0000000000', + eagleId: 1, + path: 'eagle/GET/online', + params: '{}', + sig: '00000000000000000000000000000000' + }) + const res = await fetch(`${baseUrl}/eagle?${params.toString()}`) + assert.strictEqual(res.status, 200) +}) + test('exchange endpoint', async () => { const stubMacAddress = '0000000000' const stubKey = '00000000000000000000000000000000' |
