1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-08-07 21:23:00 +03:00

Add more test for ReactionsRowButton.tsx

This commit is contained in:
Florian Duros
2024-05-22 16:24:09 +02:00
parent 8f07672da1
commit d9f718e589
2 changed files with 35 additions and 0 deletions

View File

@@ -116,4 +116,18 @@ describe("ReactionsRowButton", () => {
expect(root.asFragment()).toMatchSnapshot();
});
it("renders without a room", () => {
mockClient.getRoom.mockImplementation(() => null);
const props = createProps({});
const root = render(
<MatrixClientContext.Provider value={mockClient}>
<ReactionsRowButton {...props} />
</MatrixClientContext.Provider>,
);
expect(root.asFragment()).toMatchSnapshot();
});
});