feat: update RefreshControl mocks in tests and improve error handling in useChangePassword hook

This commit is contained in:
imeepos
2026-01-27 17:18:54 +08:00
parent 8f00d4644a
commit cd1a4f6841
13 changed files with 49 additions and 33 deletions

View File

@@ -28,7 +28,13 @@ jest.mock('@/components/icon', () => ({
// Mock components
jest.mock('@/components/ErrorState', () => 'ErrorState')
jest.mock('@/components/LoadingState', () => 'LoadingState')
jest.mock('@/components/RefreshControl', () => 'RefreshControl')
// Mock react-native RefreshControl (directly from react-native)
jest.mock('react-native', () =>
Object.assign({}, jest.requireActual('react-native'), {
RefreshControl: 'RefreshControl',
})
)
// Mock dependencies
jest.mock('expo-router', () => ({