Add ESLint Jest (#10261)

This commit is contained in:
Michael Weimann
2023-03-01 16:23:35 +01:00
committed by GitHub
parent db7748b743
commit 5398db21ad
55 changed files with 336 additions and 351 deletions
@@ -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 () => {