Skip to content

Commit f53c276

Browse files
committed
test: all tests pass
1 parent 5562741 commit f53c276

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

src/2024/Speakers/Speakers2024.test.tsx

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,6 @@ vi.mock("@data/2024.json", () => {
3535
};
3636
});
3737

38-
const initialMock2024Data = {
39-
hideSpeakers: false,
40-
edition: "2024",
41-
title: "DevBcn",
42-
cfp: {
43-
startDay: "2023-01-01T00:00:00",
44-
endDay: "2023-02-01T00:00:00",
45-
link: "https://example.com/cfp",
46-
},
47-
};
48-
const mutableMock2024Data = { ...initialMock2024Data };
49-
5038
const mockedUseFetchSpeakers = useFetchSpeakers as MockedFunction<
5139
typeof useFetchSpeakers
5240
>;
@@ -93,24 +81,6 @@ describe("Speakers2024 component", () => {
9381
});
9482
});
9583

96-
it("displays a message when hideSpeakers is true", () => {
97-
mockedUseFetchSpeakers.mockReturnValue({
98-
data: [],
99-
isLoading: false,
100-
error: null,
101-
isSuccess: true,
102-
});
103-
104-
// Modify the hideSpeakers property of our mutable mock data
105-
mutableMock2024Data.hideSpeakers = true;
106-
107-
renderWithRouterAndQueryClient(<Speakers2024 />);
108-
109-
expect(screen.getByText(/No selected speakers yet/i)).toBeInTheDocument();
110-
111-
// No need to manually restore here; beforeEach will reset it for the next test.
112-
});
113-
11484
it("calls useFetchSpeakers with the correct year", () => {
11585
// Mock the hook to return loading state
11686
mockedUseFetchSpeakers.mockReturnValue({

0 commit comments

Comments
 (0)