import { act, render, screen, waitFor } from "@testing-library/react"; import userEvent from "@testing-library/user-event"; import type { ComponentProps } from "react"; import { openCookiePreferences } from "@/lib/analytics"; import GoogleAnalytics from "./GoogleAnalytics"; jest.mock("next/script", () => ({ __esModule: true, default: ({ strategy: _strategy, ...props }: ComponentProps<"script"> & { strategy?: string }) =>