feat: /meta для версии в футере и устойчивый разбор JSON
Some checks failed
CI / build-and-test (pull_request) Has been cancelled
Some checks failed
CI / build-and-test (pull_request) Has been cancelled
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user