Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
  • Loading branch information
ruanyl committed Mar 21, 2024
1 parent cacb52f commit 4f70782
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/core/public/chrome/chrome_service.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,13 @@

import { BehaviorSubject } from 'rxjs';
import type { PublicMethodsOf } from '@osd/utility-types';
import { ChromeBadge, ChromeBreadcrumb, ChromeService, InternalChromeStart } from './';
import {
ChromeBadge,
ChromeBreadcrumb,
ChromeService,
InternalChromeStart,
LinksUpdater,
} from './';
import { getLogosMock } from '../../common/mocks';

const createSetupContractMock = () => {
Expand All @@ -40,6 +46,7 @@ const createSetupContractMock = () => {
};

const createStartContractMock = () => {
const linkUpdatersMock$ = new BehaviorSubject<LinksUpdater[]>([]);
const startContract: DeeplyMockedKeys<InternalChromeStart> = {
getHeaderComponent: jest.fn(),
navLinks: {
Expand All @@ -51,7 +58,7 @@ const createStartContractMock = () => {
update: jest.fn(),
enableForcedAppSwitcherNavigation: jest.fn(),
getForceAppSwitcherNavigation$: jest.fn(),
getLinkUpdaters$: jest.fn(),
getLinkUpdaters$: jest.fn().mockReturnValue(linkUpdatersMock$),
},
recentlyAccessed: {
add: jest.fn(),
Expand Down

0 comments on commit 4f70782

Please sign in to comment.