From ed28df48a4c171517ff24a0998b2bba0035e3479 Mon Sep 17 00:00:00 2001 From: Gustavo Madeira Santana Date: Wed, 15 Apr 2026 13:09:00 -0400 Subject: [PATCH] test(matrix): fix bootstrap password mock typing --- extensions/matrix/src/matrix/sdk/crypto-bootstrap.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/matrix/src/matrix/sdk/crypto-bootstrap.test.ts b/extensions/matrix/src/matrix/sdk/crypto-bootstrap.test.ts index a30a1405e0f..77b371deff2 100644 --- a/extensions/matrix/src/matrix/sdk/crypto-bootstrap.test.ts +++ b/extensions/matrix/src/matrix/sdk/crypto-bootstrap.test.ts @@ -5,7 +5,7 @@ import type { MatrixCryptoBootstrapApi, MatrixRawEvent } from "./types.js"; function createBootstrapperDeps() { return { getUserId: vi.fn(async () => "@bot:example.org"), - getPassword: vi.fn(() => "super-secret-password"), + getPassword: vi.fn<() => string | undefined>(() => "super-secret-password"), getDeviceId: vi.fn(() => "DEVICE123"), verificationManager: { trackVerificationRequest: vi.fn(), @@ -279,7 +279,7 @@ describe("MatrixCryptoBootstrapper", () => { it("does not mutate secret storage before forced repair fails on password UIA without a password", async () => { const deps = createBootstrapperDeps(); - deps.getPassword = vi.fn(() => undefined); + deps.getPassword = vi.fn<() => string | undefined>(() => undefined); const bootstrapCrossSigning = vi.fn< ({ authUploadDeviceSigningKeys,