Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkime committed Mar 24, 2020
1 parent 4a8d4a1 commit 0deb6b4
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ describe('.execute()', () => {
) {
const navigateToApp = jest.fn();
const dataPluginActions = dataPluginMock.createStartContract().actions;
const savedObjectsClient = savedObjectsServiceMock.createStartContract().client;
savedObjectsClient.get = jest
.fn()
.mockReturnValue({ attributes: { from: 'now-15m', to: 'now' } });

const drilldown = new DashboardToDashboardDrilldown({
getNavigateToApp: () => Promise.resolve(navigateToApp),
getGetUrlGenerator: () =>
Expand All @@ -77,8 +82,7 @@ describe('.execute()', () => {
) as UrlGeneratorContract<string>
),
getDataPluginActions: () => Promise.resolve(dataPluginActions),
getSavedObjectsClient: () =>
Promise.resolve(savedObjectsServiceMock.createStartContract().client),
getSavedObjectsClient: () => Promise.resolve(savedObjectsClient),
});
const selectRangeFiltersSpy = jest
.spyOn(dataPluginActions, 'selectRangeActionGetFilters')
Expand Down

0 comments on commit 0deb6b4

Please sign in to comment.