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:
@@ -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 () => {
|
||||
|
||||
Reference in New Issue
Block a user