mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 10:53:59 +00:00
Merge branch 'main' into upstream/terrain-partial-heights
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
commit
692e99729c
29 files changed
+1123
-39
No files matched your search
@@ -111,3 +111,24 @@ test('a failed terrain request carries the real heights the server had', async (
|
||||
return true;
|
||||
});
|
||||
});
|
||||
|
||||
test('the summary capability probe is asked once and unknown when unanswered', async () => {
|
||||
for (const [answer, expected] of [
|
||||
[() => Response.json({ configured: false }), false],
|
||||
[() => Response.json({ configured: true }), true],
|
||||
[() => new Response('missing', { status: 404 }), null],
|
||||
[() => Response.json({ configured: 'yes' }), null],
|
||||
[() => { throw new TypeError('offline'); }, null],
|
||||
]) {
|
||||
const seen = [];
|
||||
const services = createApplicationRequestServices({
|
||||
fetchImpl: async (url, init) => {
|
||||
seen.push(`${init.method || 'GET'} ${url}`);
|
||||
return answer();
|
||||
},
|
||||
});
|
||||
assert.equal(await services.summary.configured(), expected);
|
||||
assert.equal(await services.summary.configured(), expected);
|
||||
assert.deepEqual(seen, ['GET /api/openai/hud-summary/status']);
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user