lint
This commit is contained in:
@@ -8,6 +8,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
import { render } from "jest-matrix-react";
|
||||
import React from "react";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
import { type MatrixClient, MatrixEvent } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import { MediaPreviewAccountSettings } from "../../../../../../../src/components/views/settings/tabs/user/MediaPreviewAccountSettings";
|
||||
import {
|
||||
@@ -18,8 +19,11 @@ import {
|
||||
import MatrixClientBackedController from "../../../../../../../src/settings/controllers/MatrixClientBackedController";
|
||||
import MatrixClientBackedSettingsHandler from "../../../../../../../src/settings/handlers/MatrixClientBackedSettingsHandler";
|
||||
import type { MockedObject } from "jest-mock";
|
||||
import { type MatrixClient, MatrixEvent } from "matrix-js-sdk/src/matrix";
|
||||
import { MEDIA_PREVIEW_ACCOUNT_DATA_TYPE, MediaPreviewConfig, MediaPreviewValue } from "../../../../../../../src/@types/media_preview";
|
||||
import {
|
||||
MEDIA_PREVIEW_ACCOUNT_DATA_TYPE,
|
||||
type MediaPreviewConfig,
|
||||
MediaPreviewValue,
|
||||
} from "../../../../../../../src/@types/media_preview";
|
||||
import MediaPreviewConfigController from "../../../../../../../src/settings/controllers/MediaPreviewConfigController";
|
||||
|
||||
describe("MediaPreviewAccountSettings", () => {
|
||||
@@ -74,12 +78,12 @@ describe("MediaPreviewAccountSettings", () => {
|
||||
if (type === MEDIA_PREVIEW_ACCOUNT_DATA_TYPE) {
|
||||
return new MatrixEvent({
|
||||
content: {
|
||||
media_previews: MediaPreviewValue.Off
|
||||
} satisfies Partial<MediaPreviewConfig>
|
||||
media_previews: MediaPreviewValue.Off,
|
||||
} satisfies Partial<MediaPreviewConfig>,
|
||||
});
|
||||
}
|
||||
return undefined;
|
||||
})
|
||||
});
|
||||
}
|
||||
const { getByLabelText } = render(<MediaPreviewAccountSettings />);
|
||||
|
||||
@@ -92,6 +96,4 @@ describe("MediaPreviewAccountSettings", () => {
|
||||
// Ensure we don't double set the account data.
|
||||
expect(client.setAccountData).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user