Conform more of the codebase to strictNullChecks + noImplicitAny (#11179)

This commit is contained in:
Michael Telatynski 2023-07-04 14:49:27 +01:00 committed by GitHub
parent 7c211b0587
commit a294ba2ad4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 104 additions and 88 deletions

View file

@ -19,6 +19,7 @@ import React from "react";
import { fireEvent, render, screen, act } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { mocked } from "jest-mock";
import { MatrixError } from "matrix-js-sdk/src/matrix";
import InteractiveAuthDialog from "../../../../src/components/views/dialogs/InteractiveAuthDialog";
import { clearAllModals, flushPromises, getMockClientWithEventEmitter, unmockClientPeg } from "../../../test-utils";
@ -130,7 +131,7 @@ describe("InteractiveAuthDialog", function () {
const successfulResult = { test: 1 };
const makeRequest = jest
.fn()
.mockRejectedValueOnce({ httpStatus: 401, data: { flows: [{ stages: ["m.login.sso"] }] } })
.mockRejectedValueOnce(new MatrixError({ data: { flows: [{ stages: ["m.login.sso"] }] } }, 401))
.mockResolvedValue(successfulResult);
mockClient.credentials = { userId: "@user:id" };