Fix tests

This commit is contained in:
David Baker 2024-12-02 15:25:51 +00:00
parent b5ae775d8f
commit 2a5af99ac2
2 changed files with 3 additions and 2 deletions

View file

@ -352,13 +352,13 @@ describe("DeviceListener", () => {
mockCrypto!.getCrossSigningKeyId.mockResolvedValue("abc");
});
it("shows set up encryption toast when user has a key backup available", async () => {
it("shows set up recovery toast when user has a key backup available", async () => {
// non falsy response
mockCrypto.getKeyBackupInfo.mockResolvedValue({} as unknown as KeyBackupInfo);
await createAndStart();
expect(SetupEncryptionToast.showToast).toHaveBeenCalledWith(
SetupEncryptionToast.Kind.SET_UP_ENCRYPTION,
SetupEncryptionToast.Kind.SET_UP_RECOVERY,
);
});
});

View file

@ -148,6 +148,7 @@ describe("<MatrixChat />", () => {
whoami: jest.fn(),
logout: jest.fn(),
getDeviceId: jest.fn(),
getKeyBackupVersion: jest.fn(),
});
let mockClient: Mocked<MatrixClient>;
const serverConfig = {