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
|
@ -16,7 +16,7 @@ limitations under the License.
|
|||
|
||||
import React from "react";
|
||||
import { fireEvent, render, screen, within } from "@testing-library/react";
|
||||
import { Preset, Visibility } from "matrix-js-sdk/src/matrix";
|
||||
import { MatrixError, Preset, Visibility } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import CreateRoomDialog from "../../../../src/components/views/dialogs/CreateRoomDialog";
|
||||
import { flushPromises, getMockClientWithEventEmitter, mockClientMethodsUser } from "../../../test-utils";
|
||||
|
@ -29,7 +29,7 @@ describe("<CreateRoomDialog />", () => {
|
|||
getClientWellKnown: jest.fn(),
|
||||
doesServerForceEncryptionForPreset: jest.fn(),
|
||||
// make every alias available
|
||||
getRoomIdForAlias: jest.fn().mockRejectedValue({ errcode: "M_NOT_FOUND" }),
|
||||
getRoomIdForAlias: jest.fn().mockRejectedValue(new MatrixError({ errcode: "M_NOT_FOUND" })),
|
||||
});
|
||||
|
||||
const getE2eeEnableToggleInputElement = () => screen.getByLabelText("Enable end-to-end encryption");
|
||||
|
|
|
@ -131,7 +131,7 @@ describe("InteractiveAuthDialog", function () {
|
|||
const successfulResult = { test: 1 };
|
||||
const makeRequest = jest
|
||||
.fn()
|
||||
.mockRejectedValueOnce(new MatrixError({ data: { flows: [{ stages: ["m.login.sso"] }] } }, 401))
|
||||
.mockRejectedValueOnce(new MatrixError({ flows: [{ stages: ["m.login.sso"] }] }, 401))
|
||||
.mockResolvedValue(successfulResult);
|
||||
|
||||
mockClient.credentials = { userId: "@user:id" };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue