Skip to content

Commit

Permalink
remove test
Browse files Browse the repository at this point in the history
  • Loading branch information
uo288574 committed Apr 26, 2024
1 parent eb17e0c commit 0d747f5
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions webapp/src/components/Menu.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,4 @@ describe("Menu component", () => {
expect(gamesBT).toHaveLength(1);
});

test('fetches topics and navigates to game configuration', async () => {
render(
<MemoryRouter>
<Menu />
</MemoryRouter>
);

const topicsData = [{ id: 1, name: 'Topic 1' }, { id: 2, name: 'Topic 2' }];
axios.get.mockResolvedValueOnce({ data: topicsData });
const mockNavigation = jest.fn();
const location = { state: { topics: topicsData } };

fireEvent.click(screen.getByText('Clásico'));

await waitFor(() => {
expect(axios.get).toHaveBeenCalledWith(`${apiEndpoint}/topics`);
expect(mockNavigation).toHaveBeenCalledWith('/gameConfiguration', location);
});
});

});

0 comments on commit 0d747f5

Please sign in to comment.