Loki: Remove any from public/app/plugins/datasource/loki/components/LokiOptionFields.test.tsx (#54239)

This commit is contained in:
GitStart 2022-09-05 17:25:12 +01:00 committed by GitHub
parent ff35e35ce0
commit d5d7e920a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 15 deletions

View File

@ -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"],

View File

@ -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(<LokiOptionFields {...props} />);
};