Files
liqa/server/test/manifest.spec.ts
T
agent de41571b5c feat(auth): add optional authentication boundary
- Add account, JWT session, revocation, cookie and bearer handling.
- Protect server surfaces while preserving public health, manifest and disabled mode.
- Add SQLite migration and focused server regression coverage.
2026-11-04 15:43:33 -05:00

42 lines
1.3 KiB
TypeScript

import { INestApplication } from "@nestjs/common";
import request from "supertest";
import { appPackage } from "../src/common/app-package";
import { buildTestApp } from "./app.harness";
describe("GET /manifest.json", () => {
let app: INestApplication;
afterEach(async () => {
delete process.env.RUN_LOG_DATA_COLLAPSE_BYTES;
delete process.env.RUN_LOG_DATA_COLLAPSE_LINES;
await app?.close();
});
it("returns the app version and default run log data limits", async () => {
app = await buildTestApp();
const res = await request(app.getHttpServer())
.get("/manifest.json")
.expect(200);
expect(res.body).toEqual({
name: appPackage().name,
version: appPackage().version,
auth: { enabled: false },
runLogs: { dataLimits: { bytes: 256, lines: 5 } },
});
expect(res.headers["cache-control"]).toBe("no-cache");
expect(res.headers["etag"]).toBeDefined();
});
it("takes the run log data limits from the configuration", async () => {
process.env.RUN_LOG_DATA_COLLAPSE_BYTES = "1024";
process.env.RUN_LOG_DATA_COLLAPSE_LINES = "20";
app = await buildTestApp();
const res = await request(app.getHttpServer())
.get("/manifest.json")
.expect(200);
expect(res.body.runLogs.dataLimits).toEqual({ bytes: 1024, lines: 20 });
});
});