The claims that you have to mock it at the top of your file are false.
Mock a named ES Import:
// import the named module
import { useWalkthroughAnimations } from '../hooks/useWalkthroughAnimations';
// mock the file and its named export
jest.mock('../hooks/useWalkthroughAnimations', () => ({
useWalkthroughAnimations: jest.fn()
}));
// do whatever you need to do with your mocked function
useWalkthroughAnimations.mockReturnValue({ pageStyles, goToNextPage, page });