Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Remove deprecated calls to client#hasSecretStorageKey #12112

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix test
  • Loading branch information
BillCarsonFr committed Jan 3, 2024
commit 70091ad227c878b8c55693a7bcb3bbe3f9186550
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ describe("CreateKeyBackupDialog", () => {

it("should display an error message when backup creation failed", async () => {
const matrixClient = createTestClient();
mocked(matrixClient.hasSecretStorageKey).mockResolvedValue(true);
mocked(matrixClient.getCrypto()!.resetKeyBackup).mockImplementation(() => {
throw new Error("failed");
});
Expand All @@ -60,6 +61,7 @@ describe("CreateKeyBackupDialog", () => {

it("should display an error message when there is no Crypto available", async () => {
const matrixClient = createTestClient();
mocked(matrixClient.hasSecretStorageKey).mockResolvedValue(true);
mocked(matrixClient.getCrypto).mockReturnValue(undefined);
MatrixClientPeg.safeGet = MatrixClientPeg.get = () => matrixClient;

Expand Down