diff --git a/spec/unit/rust-crypto/rust-crypto.spec.ts b/spec/unit/rust-crypto/rust-crypto.spec.ts index 7b0c2ab7dc4..bacbc54ce62 100644 --- a/spec/unit/rust-crypto/rust-crypto.spec.ts +++ b/spec/unit/rust-crypto/rust-crypto.spec.ts @@ -2255,10 +2255,10 @@ describe("RustCrypto", () => { let secretStorage: ServerSideSecretStorage; beforeEach(() => { secretStorage = { - setDefaultKeyId: jest.fn(), + setDefaultKeyId: jest.fn().mockResolvedValue(undefined), hasKey: jest.fn().mockResolvedValue(false), getKey: jest.fn().mockResolvedValue(null), - store: jest.fn(), + store: jest.fn().mockResolvedValue(undefined), getDefaultKeyId: jest.fn().mockResolvedValue("defaultKeyId"), } as unknown as ServerSideSecretStorage; diff --git a/src/rust-crypto/rust-crypto.ts b/src/rust-crypto/rust-crypto.ts index 01fb456dd6e..26109df97c7 100644 --- a/src/rust-crypto/rust-crypto.ts +++ b/src/rust-crypto/rust-crypto.ts @@ -1466,6 +1466,7 @@ export class RustCrypto extends TypedEventEmitter