mirror of
https://github.com/Dasemu/Synapse.git
synced 2026-11-29 00:36:22 +00:00
Initial import of LogDarioSeq baseline
Establishes version control for the personal Logseq DB fork before starting the server-client architecture migration and domain features described in docs/agent-guide and the approved implementation plan. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
commit
40631362b3
2016 files changed
+543898
No files matched your search
+19
@@ -0,0 +1,19 @@
|
||||
import assert from "node:assert/strict";
|
||||
import test from "node:test";
|
||||
|
||||
import { apiDocsResponse } from "./api_docs.mjs";
|
||||
|
||||
test("API docs are served as standalone HTML from both docs paths", async () => {
|
||||
const html = "<!doctype html><title>Logseq Server API</title>";
|
||||
|
||||
for (const path of ["/api-docs", "/api-docs/"]) {
|
||||
const response = apiDocsResponse(path, html);
|
||||
assert.equal(response.status, 200);
|
||||
assert.equal(response.headers.get("content-type"), "text/html; charset=utf-8");
|
||||
assert.equal(await response.text(), html);
|
||||
}
|
||||
});
|
||||
|
||||
test("API docs helper ignores unrelated paths", () => {
|
||||
assert.equal(apiDocsResponse("/openapi.json", "docs"), null);
|
||||
});
|
||||
Reference in new issue
Block a user