feat: /meta для версии в футере и устойчивый разбор JSON
Some checks failed
CI / build-and-test (pull_request) Has been cancelled

This commit is contained in:
Anton
2026-04-08 10:32:52 +03:00
parent f8b4ce7111
commit 83bc603b95
9 changed files with 66 additions and 17 deletions

View File

@@ -17,6 +17,18 @@ test("GET /api/health returns ok (prefix without proxy strip)", async () => {
assert.equal(res.body.status, "ok");
});
test("GET /meta returns version for UI footer", async () => {
const res = await request(app).get("/meta").expect(200);
assert.equal(typeof res.body.version, "string");
assert.ok(res.body.version.length > 0);
});
test("GET /api/meta mirrors GET /meta", async () => {
const res = await request(app).get("/api/meta").expect(200);
assert.equal(typeof res.body.version, "string");
assert.ok(res.body.version.length > 0);
});
test("GET /ready succeeds with mock database", async () => {
const res = await request(app).get("/ready").expect(200);
assert.equal(res.body.status, "ready");