From c619db2c3525fa45f796f72a8cd48f04d80df0e9 Mon Sep 17 00:00:00 2001 From: Germain Date: Mon, 12 Dec 2022 16:23:00 +0100 Subject: [PATCH] Fix ts strict --- test/stores/TypingStore-test.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/test/stores/TypingStore-test.ts b/test/stores/TypingStore-test.ts index e0666220bb7b..d34b9362acc9 100644 --- a/test/stores/TypingStore-test.ts +++ b/test/stores/TypingStore-test.ts @@ -14,7 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { mocked } from "jest-mock"; import { MatrixClient } from "matrix-js-sdk/src/matrix"; import TypingStore from "../../src/stores/TypingStore"; @@ -31,10 +30,6 @@ jest.mock("../../src/settings/SettingsStore", () => ({ describe("TypingStore", () => { let typingStore: TypingStore; let mockClient: MatrixClient; - const settings = { - sendTypingNotifications: true, - feature_threadstable: false, - }; const roomId = "!test:example.com"; const localRoomId = LOCAL_ROOM_ID_PREFIX + "test"; @@ -45,8 +40,8 @@ describe("TypingStore", () => { const context = new TestSdkContext(); context.client = mockClient; typingStore = new TypingStore(context); - mocked(SettingsStore.getValue).mockImplementation((setting: string) => { - return settings[setting]; + jest.spyOn(SettingsStore, "getValue").mockImplementation((name: string) => { + return name === "sendTypingNotifications"; }); });