mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Loki: Remove any from public/app/plugins/datasource/loki/components/LokiOptionFields.test.tsx (#54239)
This commit is contained in:
parent
ff35e35ce0
commit
d5d7e920a0
@ -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"],
|
||||
|
@ -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} />);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user