Add bun integration tests for docs flow, update integration guide
CI / test (push) Successful in 4s

- Add test/integration.test.ts: getServicePublicKey, full flow (register, login, createCollection, createPointFeature, listFeatures)
- Update docs example: registerBySigningServiceKey then loginWithSignature
- Document integration tests in typescript-frontend-integration.md

Made-with: Cursor
This commit is contained in:
2026-03-01 13:08:09 +00:00
parent 18328706bd
commit a295e36bac
14 changed files with 654 additions and 14 deletions
+3 -2
View File
@@ -52,8 +52,9 @@ export class GeoApiClient {
const body = init.body === undefined ? undefined : JSON.stringify(init.body);
const res = await fetch(`${this.baseUrl}${path}`, { ...init, headers, body });
if (!res.ok) {
const maybeJson = await res.json().catch(() => ({}));
const msg = (maybeJson as { error?: string }).error ?? `HTTP ${res.status}`;
const maybeJson = (await res.json().catch(() => ({}))) as { error?: string; hint?: string; code?: string };
let msg = maybeJson.error ?? `HTTP ${res.status}`;
if (maybeJson.hint) msg += `. ${maybeJson.hint}`;
throw new Error(msg);
}
if (res.status === 204) {