diff --git a/packages/next/src/revalidateCache.test.ts b/packages/next/src/revalidateCache.test.ts index 031d085..6c1e52d 100644 --- a/packages/next/src/revalidateCache.test.ts +++ b/packages/next/src/revalidateCache.test.ts @@ -45,6 +45,8 @@ describe("NextJS revalidateCache", () => { method: "GET", }; - expect(revalidateCache(getReq as NextRequest)).rejects.toThrowError(); + return revalidateCache(getReq as NextRequest).catch((error) => + expect(error).toMatch("error") + ); }); }); diff --git a/packages/next/src/revalidateCache.ts b/packages/next/src/revalidateCache.ts index 2b8f336..fdec889 100644 --- a/packages/next/src/revalidateCache.ts +++ b/packages/next/src/revalidateCache.ts @@ -2,7 +2,6 @@ import type { NextRequest } from "next/server"; import { revalidatePath, revalidateTag } from "next/cache"; import { speak, getDocumentUrl } from "@silenzio/core"; -import { isDebugMode } from "@silenzio/core/utils"; async function handler(request: NextRequest) { const data = {