Skip to content

Commit

Permalink
Update mocks with specific import paths
Browse files Browse the repository at this point in the history
  • Loading branch information
gsoldevila committed Mar 3, 2025
1 parent 44f6242 commit 54af5c7
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { __IntlProvider as IntlProvider } from '@kbn/i18n-react';
import { ValueControlForm } from './value_control_form';
import { EsqlControlType, ESQLControlState } from '../types';

jest.mock('@kbn/esql-utils', () => {
jest.mock('@kbn/esql-utils/src/utils/run_query', () => {
return {
getESQLResults: jest.fn().mockResolvedValue({
response: {
Expand All @@ -34,9 +34,12 @@ jest.mock('@kbn/esql-utils', () => {
values: [],
},
}),
};
});

jest.mock('@kbn/esql-utils/src/utils/query_parsing_helpers', () => {
return {
getIndexPatternFromESQLQuery: jest.fn().mockReturnValue('index1'),
getLimitFromESQLQuery: jest.fn().mockReturnValue(1000),
isQueryWrappedByPipes: jest.fn().mockReturnValue(false),
getValuesFromQueryField: jest.fn().mockReturnValue('field'),
};
});
Expand Down

0 comments on commit 54af5c7

Please sign in to comment.