mirror of
https://github.com/element-hq/element-web.git
synced 2024-12-19 00:41:50 +03:00
Fix tests
This commit is contained in:
parent
b5ae775d8f
commit
2a5af99ac2
2 changed files with 3 additions and 2 deletions
|
@ -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 a new issue