Skip to content

Commit ec890c6

Browse files
committed
test: 💍 update test mock
1 parent 5217996 commit ec890c6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_context_menu_action.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
import { Params, PluginDeps } from './abstract_explore_data_action';
1212
import { coreMock } from '../../../../../../src/core/public/mocks';
1313
import { UrlGeneratorContract } from '../../../../../../src/plugins/share/public';
14+
import { EmbeddableStart } from '../../../../../../src/plugins/embeddable/public';
1415
import { i18n } from '@kbn/i18n';
1516
import {
1617
VisualizeEmbeddableContract,
@@ -40,10 +41,17 @@ const setup = () => {
4041
createUrl: jest.fn(() => Promise.resolve('/xyz/app/discover/foo#bar')),
4142
} as unknown) as UrlGenerator;
4243

44+
const filtersAndTimeRangeFromContext = jest.fn((async () => ({
45+
filters: [],
46+
})) as EmbeddableStart['filtersAndTimeRangeFromContext']);
47+
4348
const plugins: PluginDeps = {
4449
discover: {
4550
urlGenerator,
4651
},
52+
embeddable: {
53+
filtersAndTimeRangeFromContext,
54+
},
4755
};
4856

4957
const params: Params = {

0 commit comments

Comments
 (0)