Add null check to room directory test (#33353)
It had a waitFor but still flaked because it threw an exception accessing undefined.
This commit is contained in:
@@ -77,7 +77,7 @@ describe("usePublicRoomDirectory", () => {
|
|||||||
|
|
||||||
await waitFor(() => {
|
await waitFor(() => {
|
||||||
expect(result.current.ready).toBe(true);
|
expect(result.current.ready).toBe(true);
|
||||||
expect(result.current.publicRooms[0].name).toEqual(query);
|
expect(result.current.publicRooms[0]?.name).toEqual(query);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user