feat : remove admin bypass ads
This commit is contained in:
@@ -59,7 +59,7 @@ describe("public rendering performance", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("loads AdSense only after confirming the visitor is signed out", async () => {
|
||||
it("loads AdSense for every visitor, including signed-in admins", async () => {
|
||||
const [adsense, home, guide, guideSection, adsTxt] = await Promise.all([
|
||||
repositoryFile("components/public/google-adsense.tsx"),
|
||||
repositoryFile("app/page.tsx"),
|
||||
@@ -68,9 +68,9 @@ describe("public rendering performance", () => {
|
||||
repositoryFile("public/ads.txt"),
|
||||
]);
|
||||
|
||||
expect(adsense).toContain("authClient.useSession()");
|
||||
expect(adsense).not.toContain("authClient.useSession()");
|
||||
expect(adsense).not.toContain('from "@/lib/auth/client"');
|
||||
expect(adsense).toContain('process.env.NODE_ENV !== "production"');
|
||||
expect(adsense).toMatch(/isPending \|\|\s+error \|\|\s+session/u);
|
||||
expect(adsense).toContain("pagead2.googlesyndication.com");
|
||||
expect(home).toContain("<GoogleAdsense />");
|
||||
expect(guide).toContain("<GoogleAdsense />");
|
||||
|
||||
Reference in New Issue
Block a user