Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
kertal committed Mar 28, 2022
1 parent 369259c commit 08aacbf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
6 changes: 2 additions & 4 deletions src/plugins/discover/public/__mocks__/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { UI_SETTINGS } from '../../../data/public';
import { TopNavMenu } from '../../../navigation/public';
import { FORMATS_UI_SETTINGS } from 'src/plugins/field_formats/common';
import { LocalStorageMock } from './local_storage_mock';
import { fieldFormatsMock } from '../../../field_formats/common/mocks';
const dataPlugin = dataPluginMock.createStartContract();

export const discoverServiceMock = {
Expand All @@ -45,10 +46,7 @@ export const discoverServiceMock = {
save: true,
},
},
fieldFormats: {
getDefaultInstance: jest.fn(() => ({ convert: (value: unknown) => value })),
getFormatterForField: jest.fn(() => ({ convert: (value: unknown) => value })),
},
fieldFormats: fieldFormatsMock,
filterManager: dataPlugin.query.filterManager,
uiSettings: {
get: jest.fn((key: string) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ function mountComponent(indexPattern: DataView, prevSidebarClosed?: boolean) {
const searchSourceMock = createSearchSourceMock({});
const services = {
...discoverServiceMock,
fieldFormats: {
getDefaultInstance: jest.fn(() => ({ convert: (value: unknown) => value })),
getFormatterForField: jest.fn(() => ({ convert: (value: unknown) => value })),
},
storage: new LocalStorageMock({
[SIDEBAR_CLOSED_KEY]: prevSidebarClosed,
}) as unknown as Storage,
Expand Down

0 comments on commit 08aacbf

Please sign in to comment.