diff --git a/webapp/src/components/stats/Statistics.test.tsx b/webapp/src/components/stats/Statistics.test.tsx index 12877e9..9d745c1 100644 --- a/webapp/src/components/stats/Statistics.test.tsx +++ b/webapp/src/components/stats/Statistics.test.tsx @@ -33,20 +33,7 @@ describe('Statistics component', () => { expect(screen.getByText(mockUser.email)).toBeInTheDocument(); }); - it('renders user information correctly', async () => { - const mockUser = { username: 'testuser', email: 'testuser@example.com' }; - (useUserStore.getState as jest.Mock).mockReturnValue({ user: mockUser }); - (getUser as jest.Mock).mockResolvedValue(mockUser); - - await act(async () => { - render( - - ); - }); - - expect(screen.getByText(mockUser.username)).toBeInTheDocument(); - expect(screen.getByText(mockUser.email)).toBeInTheDocument(); - }); + it('handles error during user retrieval', async () => { const errorMessage = 'Failed to retrieve user';