mirror of
https://github.com/bitwarden/browser.git
synced 2024-09-18 02:41:15 +02:00
[PM-6426] Fixing jest test for LoginStrategyService
This commit is contained in:
parent
075cc7478b
commit
27be546826
@ -22,6 +22,7 @@ import { MessagingService } from "@bitwarden/common/platform/abstractions/messag
|
|||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
||||||
import { KdfType } from "@bitwarden/common/platform/enums";
|
import { KdfType } from "@bitwarden/common/platform/enums";
|
||||||
|
import { TaskSchedulerService } from "@bitwarden/common/platform/services/task-scheduler.service";
|
||||||
import { FakeGlobalState, FakeGlobalStateProvider } from "@bitwarden/common/spec";
|
import { FakeGlobalState, FakeGlobalStateProvider } from "@bitwarden/common/spec";
|
||||||
import { PasswordStrengthServiceAbstraction } from "@bitwarden/common/tools/password-strength";
|
import { PasswordStrengthServiceAbstraction } from "@bitwarden/common/tools/password-strength";
|
||||||
|
|
||||||
@ -57,6 +58,7 @@ describe("LoginStrategyService", () => {
|
|||||||
let authRequestService: MockProxy<AuthRequestServiceAbstraction>;
|
let authRequestService: MockProxy<AuthRequestServiceAbstraction>;
|
||||||
let userDecryptionOptionsService: MockProxy<InternalUserDecryptionOptionsServiceAbstraction>;
|
let userDecryptionOptionsService: MockProxy<InternalUserDecryptionOptionsServiceAbstraction>;
|
||||||
let billingAccountProfileStateService: MockProxy<BillingAccountProfileStateService>;
|
let billingAccountProfileStateService: MockProxy<BillingAccountProfileStateService>;
|
||||||
|
let taskSchedulerService: MockProxy<TaskSchedulerService>;
|
||||||
|
|
||||||
let stateProvider: FakeGlobalStateProvider;
|
let stateProvider: FakeGlobalStateProvider;
|
||||||
let loginStrategyCacheExpirationState: FakeGlobalState<Date | null>;
|
let loginStrategyCacheExpirationState: FakeGlobalState<Date | null>;
|
||||||
@ -82,6 +84,7 @@ describe("LoginStrategyService", () => {
|
|||||||
userDecryptionOptionsService = mock<UserDecryptionOptionsService>();
|
userDecryptionOptionsService = mock<UserDecryptionOptionsService>();
|
||||||
billingAccountProfileStateService = mock<BillingAccountProfileStateService>();
|
billingAccountProfileStateService = mock<BillingAccountProfileStateService>();
|
||||||
stateProvider = new FakeGlobalStateProvider();
|
stateProvider = new FakeGlobalStateProvider();
|
||||||
|
taskSchedulerService = mock<TaskSchedulerService>();
|
||||||
|
|
||||||
sut = new LoginStrategyService(
|
sut = new LoginStrategyService(
|
||||||
cryptoService,
|
cryptoService,
|
||||||
@ -104,6 +107,7 @@ describe("LoginStrategyService", () => {
|
|||||||
userDecryptionOptionsService,
|
userDecryptionOptionsService,
|
||||||
stateProvider,
|
stateProvider,
|
||||||
billingAccountProfileStateService,
|
billingAccountProfileStateService,
|
||||||
|
taskSchedulerService,
|
||||||
);
|
);
|
||||||
|
|
||||||
loginStrategyCacheExpirationState = stateProvider.getFake(CACHE_EXPIRATION_KEY);
|
loginStrategyCacheExpirationState = stateProvider.getFake(CACHE_EXPIRATION_KEY);
|
||||||
|
Loading…
Reference in New Issue
Block a user