Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFUzfiCVCgCVJZq4NDEqZs
15 lines
683 B
TypeScript
15 lines
683 B
TypeScript
import { describe, it, expect } from "vitest";
|
|
import { bodyLimit, DEFAULT_BODY_LIMIT, UPLOAD_BODY_LIMIT } from "./bodyLimit";
|
|
|
|
// add-custom-html-block: a page save may carry several Custom HTML blocks of up to 200,000 characters each.
|
|
describe("bodyLimit: page saves", () => {
|
|
it("gives page creates and updates the large limit", () => {
|
|
expect(bodyLimit("/api/pages")).toBe(UPLOAD_BODY_LIMIT);
|
|
expect(bodyLimit("/api/pages/12")).toBe(UPLOAD_BODY_LIMIT);
|
|
});
|
|
|
|
it("leaves other page-like paths on the default", () => {
|
|
for (const p of ["/api/pagesx", "/api/pages/12/other", "/api/companies/1/branding"]) expect(bodyLimit(p), p).toBe(DEFAULT_BODY_LIMIT);
|
|
});
|
|
});
|