Fix tests
parent
b5ae775d8f
commit
2a5af99ac2
|
@ -352,13 +352,13 @@ describe("DeviceListener", () => {
|
||||||
mockCrypto!.getCrossSigningKeyId.mockResolvedValue("abc");
|
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
|
// non falsy response
|
||||||
mockCrypto.getKeyBackupInfo.mockResolvedValue({} as unknown as KeyBackupInfo);
|
mockCrypto.getKeyBackupInfo.mockResolvedValue({} as unknown as KeyBackupInfo);
|
||||||
await createAndStart();
|
await createAndStart();
|
||||||
|
|
||||||
expect(SetupEncryptionToast.showToast).toHaveBeenCalledWith(
|
expect(SetupEncryptionToast.showToast).toHaveBeenCalledWith(
|
||||||
SetupEncryptionToast.Kind.SET_UP_ENCRYPTION,
|
SetupEncryptionToast.Kind.SET_UP_RECOVERY,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -148,6 +148,7 @@ describe("<MatrixChat />", () => {
|
||||||
whoami: jest.fn(),
|
whoami: jest.fn(),
|
||||||
logout: jest.fn(),
|
logout: jest.fn(),
|
||||||
getDeviceId: jest.fn(),
|
getDeviceId: jest.fn(),
|
||||||
|
getKeyBackupVersion: jest.fn(),
|
||||||
});
|
});
|
||||||
let mockClient: Mocked<MatrixClient>;
|
let mockClient: Mocked<MatrixClient>;
|
||||||
const serverConfig = {
|
const serverConfig = {
|
||||||
|
|
Loading…
Reference in New Issue