Skip to content

Commit 8940ec7

Browse files
committed
test: add favicon query data to DomainReportView tests for improved coverage
1 parent 82a405b commit 8940ec7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

components/domain/domain-report-view.test.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ vi.mock("@/lib/trpc/client", () => ({
4747
queryKey: ["seo", input],
4848
}),
4949
},
50+
favicon: {
51+
queryOptions: (input: { domain: string }) => ({
52+
queryKey: ["favicon", input],
53+
}),
54+
},
5055
},
5156
}),
5257
}));
@@ -198,6 +203,9 @@ describe("DomainReportView Export", () => {
198203
queryClient.setQueryData(["certificates", { domain }], []);
199204
queryClient.setQueryData(["headers", { domain }], []);
200205
queryClient.setQueryData(["seo", { domain }], { title: "Test" });
206+
queryClient.setQueryData(["favicon", { domain }], {
207+
url: "https://test-store.public.blob.vercel-storage.com/abcdef0123456789abcdef0123456789/32x32.webp",
208+
});
201209

202210
render(
203211
<QueryClientProvider client={queryClient}>
@@ -232,6 +240,8 @@ describe("DomainReportView Export", () => {
232240
certificates: [],
233241
headers: [],
234242
seo: { title: "Test" },
243+
favicon:
244+
"https://test-store.public.blob.vercel-storage.com/abcdef0123456789abcdef0123456789/32x32.webp",
235245
});
236246
});
237247

0 commit comments

Comments
 (0)