Skip to content

Commit

Permalink
Fixed failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
gbubemismith committed Dec 20, 2024
1 parent 2f4c13f commit 2a921e3
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ import { mock } from "jest-mock-extended";

import { CollectionService } from "@bitwarden/admin-console/common";
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
import { Utils } from "@bitwarden/common/platform/misc/utils";
import { FakeAccountService, mockAccountServiceWith } from "@bitwarden/common/spec";
import { UserId } from "@bitwarden/common/types/guid";
import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction";
import { CipherType } from "@bitwarden/common/vault/enums";
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
Expand All @@ -29,6 +33,8 @@ describe("EmergencyViewDialogComponent", () => {
card: {},
} as CipherView;

const accountService: FakeAccountService = mockAccountServiceWith(Utils.newGuid() as UserId);

beforeEach(async () => {
open.mockClear();
close.mockClear();
Expand All @@ -43,6 +49,7 @@ describe("EmergencyViewDialogComponent", () => {
{ provide: DialogService, useValue: { open } },
{ provide: DialogRef, useValue: { close } },
{ provide: DIALOG_DATA, useValue: { cipher: mockCipher } },
{ provide: AccountService, useValue: accountService },
],
}).compileComponents();

Expand Down

0 comments on commit 2a921e3

Please sign in to comment.