import { redactAuthRequestBody } from "../src/interceptors/logging.interceptor"; describe("redactAuthRequestBody", () => { it("redacts login passwords on local and API-prefixed route paths", () => { const body = { username: "operator", password: "synthetic-secret" }; expect(redactAuthRequestBody("/auth/login", body)).toEqual({ username: "operator", password: "[REDACTED]", }); expect(redactAuthRequestBody("/api/v1/auth/login", body)).toEqual({ username: "operator", password: "[REDACTED]", }); expect(redactAuthRequestBody("/api/v1/scenarios", body)).toBe(body); }); });