Skip to content
Merged
Prev Previous commit
Next Next commit
[test] use FirebaseError
Co-authored-by: Alexander Brown <[email protected]>
  • Loading branch information
arjansingh and DrJKL committed Aug 22, 2025
commit f46eaf35b3894e70e6906c434da63e907a1937c2
7 changes: 4 additions & 3 deletions tests-ui/tests/store/firebaseAuthStore.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -363,9 +363,10 @@ describe('useFirebaseAuthStore', () => {
mockUser.getIdToken.mockReset()

// Mock a non-network error using actual Firebase Auth error code
const authError = new Error('User account is disabled.')
authError.name = 'FirebaseError'
;(authError as any).code = 'auth/user-disabled'
const authError = new FirebaseError(
/** whichever one is 'auth/user-disabled' */,
'User account is disabled.'
)

mockUser.getIdToken.mockRejectedValue(authError)

Expand Down