@@ -17,7 +17,7 @@ vi.mock("sonner", () => ({
1717} ) ) ;
1818
1919// Mock auth client
20- vi . mock ( "@/lib/auth-client" , ( ) => ( {
20+ vi . mock ( "@/lib/auth/auth -client" , ( ) => ( {
2121 authClient : {
2222 signIn : {
2323 oauth2 : vi . fn ( ) ,
@@ -64,7 +64,7 @@ describe("SignInPage", () => {
6464
6565 test ( "calls authClient.signIn.oauth2 when button is clicked" , async ( ) => {
6666 const user = userEvent . setup ( ) ;
67- const { authClient } = await import ( "@/lib/auth-client" ) ;
67+ const { authClient } = await import ( "@/lib/auth/auth -client" ) ;
6868 vi . mocked ( authClient . signIn . oauth2 ) . mockResolvedValue ( { error : null } ) ;
6969
7070 render ( < SignInPage /> ) ;
@@ -83,7 +83,7 @@ describe("SignInPage", () => {
8383 test ( "shows error toast when signin fails with error" , async ( ) => {
8484 const user = userEvent . setup ( ) ;
8585 const { toast } = await import ( "sonner" ) ;
86- const { authClient } = await import ( "@/lib/auth-client" ) ;
86+ const { authClient } = await import ( "@/lib/auth/auth -client" ) ;
8787
8888 vi . mocked ( authClient . signIn . oauth2 ) . mockResolvedValue ( {
8989 error : {
@@ -106,7 +106,7 @@ describe("SignInPage", () => {
106106 test ( "shows error toast when signin throws exception" , async ( ) => {
107107 const user = userEvent . setup ( ) ;
108108 const { toast } = await import ( "sonner" ) ;
109- const { authClient } = await import ( "@/lib/auth-client" ) ;
109+ const { authClient } = await import ( "@/lib/auth/auth -client" ) ;
110110
111111 vi . mocked ( authClient . signIn . oauth2 ) . mockRejectedValue (
112112 new Error ( "Network error" ) ,
@@ -127,7 +127,7 @@ describe("SignInPage", () => {
127127 test ( "shows generic error message for unknown errors" , async ( ) => {
128128 const user = userEvent . setup ( ) ;
129129 const { toast } = await import ( "sonner" ) ;
130- const { authClient } = await import ( "@/lib/auth-client" ) ;
130+ const { authClient } = await import ( "@/lib/auth/auth -client" ) ;
131131
132132 vi . mocked ( authClient . signIn . oauth2 ) . mockRejectedValue (
133133 "Something went wrong" ,
0 commit comments