1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-07 04:03:29 +00:00

fix electron key service unit tests failing

This commit is contained in:
Maciej Zieniuk
2025-06-04 10:49:38 +01:00
parent 7470a578fa
commit 03ecd517aa

View File

@@ -119,7 +119,7 @@ describe("ElectronKeyService", () => {
cryptoFunctionService.randomBytes.mockResolvedValue(
clientKeyHalfBytes.buffer as CsprngArray,
);
encryptService.encryptString.mockResolvedValue(encryptedClientKeyHalf);
encryptService.encrypt.mockResolvedValue(encryptedClientKeyHalf);
await keyService.setUserKey(userKey, mockUserId);
@@ -145,7 +145,7 @@ describe("ElectronKeyService", () => {
mockUserId,
);
expect(cryptoFunctionService.randomBytes).toHaveBeenCalledWith(32);
expect(encryptService.encryptString).toHaveBeenCalledWith(clientKeyHalf, userKey);
expect(encryptService.encrypt).toHaveBeenCalledWith(clientKeyHalf, userKey);
});
it("sets decrypted biometric client key half and biometric unlock key when existing biometric client key half stored", async () => {