diff --git a/src/plugins/data/common/search/expressions/filters_to_ast.test.ts b/src/plugins/data/common/search/expressions/filters_to_ast.test.ts index fe51259543937..6d7e656446b50 100644 --- a/src/plugins/data/common/search/expressions/filters_to_ast.test.ts +++ b/src/plugins/data/common/search/expressions/filters_to_ast.test.ts @@ -24,16 +24,22 @@ describe('interpreter/functions#filtersToAst', () => { expect(actual[0].functions[0]).toHaveProperty('name', 'kibanaFilter'); expect(actual[0].functions[0].arguments).toMatchInlineSnapshot(` Object { + "negate": Array [ + false, + ], "query": Array [ - "{\\"test\\":\\"something\\"}", + "{\\"query\\":{\\"test\\":\\"something\\"}}", ], } `); expect(actual[1].functions[0]).toHaveProperty('name', 'kibanaFilter'); expect(actual[1].functions[0].arguments).toMatchInlineSnapshot(` Object { + "negate": Array [ + true, + ], "query": Array [ - "{\\"test\\":\\"something\\"}", + "{\\"query\\":{\\"test\\":\\"something\\"}}", ], } `); diff --git a/src/plugins/data/common/search/expressions/kibana_context.ts b/src/plugins/data/common/search/expressions/kibana_context.ts index f530d4b0b4663..98d7a2c45b4fc 100644 --- a/src/plugins/data/common/search/expressions/kibana_context.ts +++ b/src/plugins/data/common/search/expressions/kibana_context.ts @@ -8,12 +8,9 @@ import { uniqBy } from 'lodash'; import { i18n } from '@kbn/i18n'; -import { - ExpressionFunctionDefinition, - ExecutionContext, - unboxExpressionValue, -} from 'src/plugins/expressions/common'; +import { ExpressionFunctionDefinition, ExecutionContext } from 'src/plugins/expressions/common'; import { Adapters } from 'src/plugins/inspector/common'; +import { unboxExpressionValue } from '../../../../expressions/common'; import { Query, uniqFilters } from '../../query'; import { ExecutionContextSearch, KibanaContext, KibanaFilter } from './kibana_context_type'; import { KibanaQueryOutput } from './kibana_context_type'; diff --git a/src/plugins/data/common/search/expressions/kibana_filter.test.ts b/src/plugins/data/common/search/expressions/kibana_filter.test.ts index 927b27c2e2954..1446fe7646030 100644 --- a/src/plugins/data/common/search/expressions/kibana_filter.test.ts +++ b/src/plugins/data/common/search/expressions/kibana_filter.test.ts @@ -34,9 +34,7 @@ describe('interpreter/functions#kibanaFilter', () => { "disabled": false, "negate": false, }, - "query": Object { - "name": "test", - }, + "name": "test", "type": "kibana_filter", } `);