@@ -1001,6 +1001,7 @@ describe("signInWithCustomToken", () => {
10011001
10021002 const result = await signInWithCustomToken ( mockUI , customToken ) ;
10031003
1004+ expect ( mockUI . setRedirectError ) . toHaveBeenCalledWith ( undefined ) ;
10041005 expect ( vi . mocked ( mockUI . setState ) . mock . calls ) . toEqual ( [ [ "pending" ] , [ "idle" ] ] ) ;
10051006
10061007 expect ( _signInWithCustomToken ) . toHaveBeenCalledWith ( mockUI . auth , customToken ) ;
@@ -1018,6 +1019,7 @@ describe("signInWithCustomToken", () => {
10181019
10191020 await signInWithCustomToken ( mockUI , customToken ) ;
10201021
1022+ expect ( mockUI . setRedirectError ) . toHaveBeenCalledWith ( undefined ) ;
10211023 expect ( handleFirebaseError ) . toHaveBeenCalledWith ( mockUI , error ) ;
10221024
10231025 expect ( vi . mocked ( mockUI . setState ) . mock . calls ) . toEqual ( [ [ "pending" ] , [ "idle" ] ] ) ;
@@ -1032,6 +1034,8 @@ describe("signInWithCustomToken", () => {
10321034
10331035 await signInWithCustomToken ( mockUI , customToken ) ;
10341036
1037+ // Verify redirect error is cleared even when network error occurs
1038+ expect ( mockUI . setRedirectError ) . toHaveBeenCalledWith ( undefined ) ;
10351039 expect ( handleFirebaseError ) . toHaveBeenCalledWith ( mockUI , error ) ;
10361040
10371041 expect ( vi . mocked ( mockUI . setState ) . mock . calls ) . toEqual ( [ [ "pending" ] , [ "idle" ] ] ) ;
@@ -1046,6 +1050,8 @@ describe("signInWithCustomToken", () => {
10461050
10471051 await signInWithCustomToken ( mockUI , customToken ) ;
10481052
1053+ // Verify redirect error is cleared even when token is expired
1054+ expect ( mockUI . setRedirectError ) . toHaveBeenCalledWith ( undefined ) ;
10491055 expect ( handleFirebaseError ) . toHaveBeenCalledWith ( mockUI , error ) ;
10501056
10511057 expect ( vi . mocked ( mockUI . setState ) . mock . calls ) . toEqual ( [ [ "pending" ] , [ "idle" ] ] ) ;
0 commit comments