import nextConfig from "../next.config"; describe("next.config", () => { it("does not announce the framework in the X-Powered-By header", () => { expect(nextConfig.poweredByHeader).toBe(false); }); it("keeps the CSP in Report-Only until Google Ads is allowed in it, never enforcing it by accident", async () => { const rules = (await nextConfig.headers?.()) ?? []; const site = rules.find(({ source }) => source === "/(.*)"); const names = site?.headers.map(({ key }) => key) ?? []; expect(names).toContain("Content-Security-Policy-Report-Only"); expect(names).not.toContain("Content-Security-Policy"); }); });