Conform more of the codebase to strict types (#11191)
This commit is contained in:
parent
4044c2aa66
commit
8107f1d271
25 changed files with 88 additions and 57 deletions
|
@ -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 () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue