mirror of
https://github.com/Since-3/Kuma.git
synced 2026-10-12 21:41:17 +00:00
see comments
This commit is contained in:
parent
51e6f4cd2a
commit
e2a419a343
3 changed files with 12 additions and 7 deletions
|
|
@ -1,6 +1,12 @@
|
|||
import { describe, it, expect, vi, beforeEach } from "vitest";
|
||||
import { renderHook, act } from "@testing-library/react";
|
||||
|
||||
const { mockRouterPush, mockSetUser, mockSupabaseSignIn } = vi.hoisted(() => ({
|
||||
mockRouterPush: vi.fn(),
|
||||
mockSetUser: vi.fn(),
|
||||
mockSupabaseSignIn: vi.fn(),
|
||||
}));
|
||||
|
||||
vi.mock("next/navigation", () => ({
|
||||
useRouter: () => ({ push: mockRouterPush }),
|
||||
}));
|
||||
|
|
@ -18,10 +24,6 @@ vi.mock("sonner", () => ({
|
|||
toast: { success: vi.fn(), error: vi.fn() },
|
||||
}));
|
||||
|
||||
const mockRouterPush = vi.fn();
|
||||
const mockSetUser = vi.fn();
|
||||
const mockSupabaseSignIn = vi.fn();
|
||||
|
||||
import { useAuth } from "@/src/hooks/useAuth";
|
||||
|
||||
beforeEach(() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue