Use mapped types around account data events
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@@ -16,6 +16,7 @@ import {
|
||||
IContent,
|
||||
MatrixEvent,
|
||||
SyncState,
|
||||
AccountDataEvents,
|
||||
} from "matrix-js-sdk/src/matrix";
|
||||
import { waitFor } from "jest-matrix-react";
|
||||
import { CallMembership, MatrixRTCSession } from "matrix-js-sdk/src/matrixrtc";
|
||||
@@ -69,7 +70,7 @@ describe("Notifier", () => {
|
||||
let MockPlatform: MockedObject<BasePlatform>;
|
||||
let mockClient: MockedObject<MatrixClient>;
|
||||
let testRoom: Room;
|
||||
let accountDataEventKey: string;
|
||||
let accountDataEventKey: keyof AccountDataEvents;
|
||||
let accountDataStore: Record<string, MatrixEvent | undefined> = {};
|
||||
|
||||
let mockSettings: Record<string, boolean> = {};
|
||||
|
||||
@@ -6,7 +6,14 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { MatrixEvent, NotificationCountType, Room, MatrixClient, ReceiptType } from "matrix-js-sdk/src/matrix";
|
||||
import {
|
||||
MatrixEvent,
|
||||
NotificationCountType,
|
||||
Room,
|
||||
MatrixClient,
|
||||
ReceiptType,
|
||||
AccountDataEvents,
|
||||
} from "matrix-js-sdk/src/matrix";
|
||||
import { Mocked, mocked } from "jest-mock";
|
||||
|
||||
import {
|
||||
@@ -32,7 +39,7 @@ jest.mock("../../../src/settings/SettingsStore");
|
||||
describe("notifications", () => {
|
||||
let accountDataStore: Record<string, MatrixEvent> = {};
|
||||
let mockClient: Mocked<MatrixClient>;
|
||||
let accountDataEventKey: string;
|
||||
let accountDataEventKey: keyof AccountDataEvents;
|
||||
|
||||
beforeEach(() => {
|
||||
jest.clearAllMocks();
|
||||
|
||||
Reference in New Issue
Block a user