diff --git a/.betterer.results b/.betterer.results index 49df936c93c..21ef4a33848 100644 --- a/.betterer.results +++ b/.betterer.results @@ -6988,9 +6988,6 @@ exports[`better eslint`] = { [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Do not use any type assertions.", "1"] ], - "public/app/plugins/datasource/loki/components/LokiOptionFields.test.tsx:5381": [ - [0, 0, 0, "Unexpected any. Specify a different type.", "0"] - ], "public/app/plugins/datasource/loki/components/LokiQueryField.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Do not use any type assertions.", "1"], diff --git a/public/app/plugins/datasource/loki/components/LokiOptionFields.test.tsx b/public/app/plugins/datasource/loki/components/LokiOptionFields.test.tsx index 89e51d201cd..1219d19a5de 100644 --- a/public/app/plugins/datasource/loki/components/LokiOptionFields.test.tsx +++ b/public/app/plugins/datasource/loki/components/LokiOptionFields.test.tsx @@ -3,23 +3,21 @@ import React from 'react'; import { LokiOptionFieldsProps, LokiOptionFields } from './LokiOptionFields'; -const setup = (propOverrides?: LokiOptionFieldsProps) => { - const queryType = 'range'; +const setup = () => { const lineLimitValue = '1'; - const onLineLimitChange = jest.fn(); - const onQueryTypeChange = jest.fn(); - const onKeyDownFunc = jest.fn(); + const resolution = 1; + const query = { refId: '1', expr: 'query' }; + const onChange = jest.fn(); + const onRunQuery = jest.fn(); - const props: any = { - queryType, + const props: LokiOptionFieldsProps = { lineLimitValue, - onLineLimitChange, - onQueryTypeChange, - onKeyDownFunc, + resolution, + query, + onChange, + onRunQuery, }; - Object.assign(props, propOverrides); - return render(); };