1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-08-09 08:42:50 +03:00

Call the AsJson forms of import and exportRoomKeys (#12233)

This commit is contained in:
Andy Balaam
2024-02-14 10:33:39 +00:00
committed by GitHub
parent 44e18b188c
commit 35ad92bf54
4 changed files with 9 additions and 9 deletions

View File

@@ -71,10 +71,10 @@ describe("ImportE2eKeysDialog", () => {
const cli = createTestClient();
const onFinished = jest.fn();
const file = new File(["test"], "file.txt", { type: "text/plain" });
const importRoomKeys = jest.fn();
const importRoomKeysAsJson = jest.fn();
cli.getCrypto = () => {
return {
importRoomKeys,
importRoomKeysAsJson,
} as unknown as CryptoApi;
};
@@ -90,6 +90,6 @@ describe("ImportE2eKeysDialog", () => {
await userEvent.paste("passphrase");
fireEvent.click(container.querySelector("[type=submit]")!);
await waitFor(() => expect(importRoomKeys).toHaveBeenCalled());
await waitFor(() => expect(importRoomKeysAsJson).toHaveBeenCalled());
});
});