fix(production) : prevent hydration and service failures
This commit is contained in:
@@ -72,6 +72,8 @@ describe("public rendering performance", () => {
|
||||
expect(adsense).not.toContain('from "@/lib/auth/client"');
|
||||
expect(adsense).toContain('process.env.NODE_ENV !== "production"');
|
||||
expect(adsense).toContain("pagead2.googlesyndication.com");
|
||||
expect(adsense).toContain("<script");
|
||||
expect(adsense).not.toContain('from "next/script"');
|
||||
expect(home).toContain("<GoogleAdsense />");
|
||||
expect(guide).toContain("<GoogleAdsense />");
|
||||
expect(guideSection).toContain("<GoogleAdsense />");
|
||||
@@ -79,4 +81,17 @@ describe("public rendering performance", () => {
|
||||
"google.com, pub-9687404323559597, DIRECT, f08c47fec0942fa0",
|
||||
);
|
||||
});
|
||||
|
||||
it("allows the production analytics and advertising endpoints", async () => {
|
||||
const headers = await repositoryFile("lib/security/headers.ts");
|
||||
|
||||
expect(headers).toContain("https://static.cloudflareinsights.com");
|
||||
expect(headers).toContain("https://*.adtrafficquality.google");
|
||||
});
|
||||
|
||||
it("accepts Next.js deployment metadata on the document root", async () => {
|
||||
const layout = await repositoryFile("app/layout.tsx");
|
||||
|
||||
expect(layout).toContain("suppressHydrationWarning");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user