mirror of
https://github.com/element-hq/element-web.git
synced 2024-12-18 12:51:49 +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");
|
||||
});
|
||||
|
||||
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,
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -148,6 +148,7 @@ describe("<MatrixChat />", () => {
|
|||
whoami: jest.fn(),
|
||||
logout: jest.fn(),
|
||||
getDeviceId: jest.fn(),
|
||||
getKeyBackupVersion: jest.fn(),
|
||||
});
|
||||
let mockClient: Mocked<MatrixClient>;
|
||||
const serverConfig = {
|
||||
|
|
Loading…
Reference in a new issue