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

@@ -80,7 +80,7 @@ describe('HeroSlider Component', () => {
describe('Callback Behavior', () => {
it('should call onActivityPress with link when activity is pressed', () => {
const onActivityPress = jest.fn()
const props = {
const props: { activities: typeof mockActivities; onActivityPress?: (link: string) => void } = {
activities: mockActivities,
onActivityPress,
}
@@ -90,7 +90,7 @@ describe('HeroSlider Component', () => {
})
it('should not throw when onActivityPress is not provided', () => {
const props = { activities: mockActivities }
const props: { activities: typeof mockActivities; onActivityPress?: (link: string) => void } = { activities: mockActivities }
expect(() => {
if (props.onActivityPress) {
props.onActivityPress(mockActivities[0].link)