test(mood): keep the random request id out of the no-leak byte check

This commit is contained in:
Marc-André Bombeck committed 2026-10-16 05:48:00 +02:00
1 parent d2a806364b
commit 527d177371
1 file changed
+3 -2
@@ -418,8 +418,9 @@ describe("GET /api/mood/prognosis", () => {
expect(res.status).toBe(403);
// Asserted on the bytes, not on a parsed field: the point is that not one
// figure of the owner's reached the response.
const raw = await res.text();
// figure of the owner's reached the response. The error's random request
// id is taken out first, since its hex digits can spell any small count.
const raw = (await res.text()).replace(/"requestId":"[^"]*"/, "");
expect(raw).not.toContain("predicted");
expect(raw).not.toContain("ciLow");
expect(raw).not.toContain("dimension:a2");