You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-08-09 08:42:50 +03:00
Add ESLint Jest (#10261)
This commit is contained in:
@@ -47,7 +47,7 @@ describe("<DeviceDetailHeading />", () => {
|
||||
expect({ container }).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it("renders device id as fallback when device has no display name ", () => {
|
||||
it("renders device id as fallback when device has no display name", () => {
|
||||
const { getByText } = render(
|
||||
getComponent({
|
||||
device: { ...device, display_name: undefined },
|
||||
|
@@ -207,17 +207,6 @@ describe("<SessionManagerTab />", () => {
|
||||
expect(container.getElementsByClassName("mx_Spinner").length).toBeTruthy();
|
||||
});
|
||||
|
||||
it("removes spinner when device fetch fails", async () => {
|
||||
mockClient.getDevices.mockRejectedValue({ httpStatus: 404 });
|
||||
const { container } = render(getComponent());
|
||||
expect(mockClient.getDevices).toHaveBeenCalled();
|
||||
|
||||
await act(async () => {
|
||||
await flushPromises();
|
||||
});
|
||||
expect(container.getElementsByClassName("mx_Spinner").length).toBeFalsy();
|
||||
});
|
||||
|
||||
it("removes spinner when device fetch fails", async () => {
|
||||
// eat the expected error log
|
||||
jest.spyOn(logger, "error").mockImplementation(() => {});
|
||||
@@ -760,7 +749,7 @@ describe("<SessionManagerTab />", () => {
|
||||
expect(mockClient.getDevices).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("deletes a device when interactive auth is not required", async () => {
|
||||
it("does not delete a device when interactive auth is not required", async () => {
|
||||
const { getByTestId } = render(getComponent());
|
||||
|
||||
await act(async () => {
|
||||
|
Reference in New Issue
Block a user