Skip to content

Commit 34d355c

Browse files
Update src/components/__tests__/CelestialFeaturedCollection.test.tsx
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 4f2c351 commit 34d355c

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/components/__tests__/CelestialFeaturedCollection.test.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -273,10 +273,12 @@ describe("CelestialFeaturedCollection — Digital Tray", () => {
273273
describe("error handling", () => {
274274
it("does not crash when supabase.rpc returns an error", async () => {
275275
const { supabase } = await import("@/integrations/supabase/client");
276-
vi.mocked(supabase.rpc).mockResolvedValueOnce({
277-
data: null,
278-
error: { message: "Network error" },
279-
} as any);
276+
vi.mocked(supabase.rpc).mockImplementationOnce(() =>
277+
Promise.resolve({
278+
data: null,
279+
error: { message: "Network error" },
280+
}),
281+
);
280282

281283
renderComponent();
282284

0 commit comments

Comments
 (0)