Conform more of the codebase to strict types (#11191)

This commit is contained in:
Michael Telatynski 2023-07-05 11:53:22 +01:00 committed by GitHub
parent 4044c2aa66
commit 8107f1d271
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 88 additions and 57 deletions

View file

@ -17,8 +17,7 @@ limitations under the License.
import React from "react";
import { fireEvent, render, screen, waitForElementToBeRemoved } from "@testing-library/react";
import { createClient, MatrixClient } from "matrix-js-sdk/src/matrix";
import { MatrixError } from "matrix-js-sdk/src/http-api/errors";
import { createClient, MatrixClient, MatrixError } from "matrix-js-sdk/src/matrix";
import { mocked } from "jest-mock";
import fetchMock from "fetch-mock-jest";
@ -26,7 +25,10 @@ import SdkConfig, { DEFAULTS } from "../../../../src/SdkConfig";
import { mkServerConfig, mockPlatformPeg, unmockPlatformPeg } from "../../../test-utils";
import Registration from "../../../../src/components/structures/auth/Registration";
jest.mock("matrix-js-sdk/src/matrix");
jest.mock("matrix-js-sdk/src/matrix", () => ({
...jest.requireActual("matrix-js-sdk/src/matrix"),
createClient: jest.fn(),
}));
jest.useFakeTimers();
describe("Registration", function () {