test(cctv): make the oversized Houston catalog fixture valid JSON

The streamed oversized body was invalid JSON, so the loader returned
nothing whether or not the byte cap applied. Pad a valid catalog with a
usable camera instead, so only the cap can refuse it.
This commit is contained in:
Sameh Khamis committed 2026-11-03 15:04:05 -08:00
1 parent f120989a2b
commit c66f8f039b
1 file changed
+5 -1
+5 -1
View File
@@ -236,7 +236,11 @@ test('the catalog fetch refuses redirects and oversized bodies', async (t) => {
t.mock.restoreAll();
t.mock.method(console, 'warn', () => {});
t.mock.method(globalThis, 'fetch', async () => {
const oversized = 'x'.repeat(HOUSTON_MAX_CATALOG_BYTES + 1024);
// Valid JSON with a usable camera, so only the byte cap can refuse it.
const oversized = JSON.stringify({
cameras: [row()],
padding: 'x'.repeat(HOUSTON_MAX_CATALOG_BYTES + 1024),
});
return new Response(
new ReadableStream({
start(controller) {