Skip to content

Commit

Permalink
test: πŸ’ update test mock
Browse files Browse the repository at this point in the history
  • Loading branch information
streamich committed Jun 18, 2020
1 parent 5217996 commit ec890c6
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
import { Params, PluginDeps } from './abstract_explore_data_action';
import { coreMock } from '../../../../../../src/core/public/mocks';
import { UrlGeneratorContract } from '../../../../../../src/plugins/share/public';
import { EmbeddableStart } from '../../../../../../src/plugins/embeddable/public';
import { i18n } from '@kbn/i18n';
import {
VisualizeEmbeddableContract,
Expand Down Expand Up @@ -40,10 +41,17 @@ const setup = () => {
createUrl: jest.fn(() => Promise.resolve('/xyz/app/discover/foo#bar')),
} as unknown) as UrlGenerator;

const filtersAndTimeRangeFromContext = jest.fn((async () => ({
filters: [],
})) as EmbeddableStart['filtersAndTimeRangeFromContext']);

const plugins: PluginDeps = {
discover: {
urlGenerator,
},
embeddable: {
filtersAndTimeRangeFromContext,
},
};

const params: Params = {
Expand Down

0 comments on commit ec890c6

Please sign in to comment.