1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-09 13:10:17 +00:00
This commit is contained in:
Bernd Schoolmann
2025-08-29 13:58:22 +02:00
parent 602b5a01e4
commit 9e1a683c44

View File

@@ -1,7 +1,5 @@
import { mock, MockProxy } from "jest-mock-extended";
import { CryptoFunctionService } from "@bitwarden/common/key-management/crypto/abstractions/crypto-function.service";
import { EncryptService } from "@bitwarden/common/key-management/crypto/abstractions/encrypt.service";
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
import { EncryptionType } from "@bitwarden/common/platform/enums";
@@ -35,8 +33,6 @@ describe("MainBiometricsService", function () {
const windowMain = mock<WindowMain>();
const logService = mock<LogService>();
const biometricStateService = mock<BiometricStateService>();
const cryptoFunctionService = mock<CryptoFunctionService>();
const encryptService = mock<EncryptService>();
it("Should call the platformspecific methods", async () => {
const sut = new MainBiometricsService(
@@ -45,8 +41,6 @@ describe("MainBiometricsService", function () {
logService,
process.platform,
biometricStateService,
encryptService,
cryptoFunctionService,
);
const mockService = mock<OsBiometricService>();
@@ -64,8 +58,6 @@ describe("MainBiometricsService", function () {
logService,
"win32",
biometricStateService,
encryptService,
cryptoFunctionService,
);
const internalService = (sut as any).osBiometricsService;
@@ -80,8 +72,6 @@ describe("MainBiometricsService", function () {
logService,
"darwin",
biometricStateService,
encryptService,
cryptoFunctionService,
);
const internalService = (sut as any).osBiometricsService;
expect(internalService).not.toBeNull();
@@ -95,8 +85,6 @@ describe("MainBiometricsService", function () {
logService,
"linux",
biometricStateService,
encryptService,
cryptoFunctionService,
);
const internalService = (sut as any).osBiometricsService;
@@ -116,8 +104,6 @@ describe("MainBiometricsService", function () {
logService,
process.platform,
biometricStateService,
encryptService,
cryptoFunctionService,
);
innerService = mock();
@@ -215,8 +201,6 @@ describe("MainBiometricsService", function () {
logService,
process.platform,
biometricStateService,
encryptService,
cryptoFunctionService,
);
const osBiometricsService = mock<OsBiometricService>();
(sut as any).osBiometricsService = osBiometricsService;
@@ -235,8 +219,6 @@ describe("MainBiometricsService", function () {
logService,
process.platform,
biometricStateService,
encryptService,
cryptoFunctionService,
);
const osBiometricsService = mock<OsBiometricService>();
(sut as any).osBiometricsService = osBiometricsService;
@@ -258,8 +240,6 @@ describe("MainBiometricsService", function () {
logService,
process.platform,
biometricStateService,
encryptService,
cryptoFunctionService,
);
osBiometricsService = mock<OsBiometricService>();
(sut as any).osBiometricsService = osBiometricsService;
@@ -299,8 +279,6 @@ describe("MainBiometricsService", function () {
logService,
process.platform,
biometricStateService,
encryptService,
cryptoFunctionService,
);
osBiometricsService = mock<OsBiometricService>();
(sut as any).osBiometricsService = osBiometricsService;
@@ -323,8 +301,6 @@ describe("MainBiometricsService", function () {
logService,
process.platform,
biometricStateService,
encryptService,
cryptoFunctionService,
);
const osBiometricsService = mock<OsBiometricService>();
(sut as any).osBiometricsService = osBiometricsService;
@@ -347,8 +323,6 @@ describe("MainBiometricsService", function () {
logService,
process.platform,
biometricStateService,
encryptService,
cryptoFunctionService,
);
});
@@ -377,8 +351,6 @@ describe("MainBiometricsService", function () {
logService,
process.platform,
biometricStateService,
encryptService,
cryptoFunctionService,
);
const shouldAutoPrompt = await sut.getShouldAutopromptNow();