mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Loki: Fix types in querybuilder state test (#53223)
* Chore: add missing refId property to LokiQuery type * Chore: fix types in Loki querybuilder state test * Chore: remove unnecessary added property to LokiQuery
This commit is contained in:
parent
3877964470
commit
97ce40577b
@ -7536,10 +7536,6 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "1"]
|
||||
],
|
||||
"public/app/plugins/datasource/loki/querybuilder/state.test.ts:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
|
||||
],
|
||||
"public/app/plugins/datasource/loki/querybuilder/state.ts:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||
],
|
||||
|
@ -4,7 +4,7 @@ import { changeEditorMode, getQueryWithDefaults } from './state';
|
||||
|
||||
describe('getQueryWithDefaults(', () => {
|
||||
it('should set defaults', () => {
|
||||
expect(getQueryWithDefaults({ refId: 'A' } as any)).toEqual({
|
||||
expect(getQueryWithDefaults({ refId: 'A', expr: '' })).toEqual({
|
||||
editorMode: 'builder',
|
||||
expr: '',
|
||||
queryType: 'range',
|
||||
@ -17,6 +17,6 @@ describe('getQueryWithDefaults(', () => {
|
||||
expect(query.editorMode).toBe(QueryEditorMode.Code);
|
||||
});
|
||||
|
||||
expect(getQueryWithDefaults({ refId: 'A' } as any).editorMode).toEqual(QueryEditorMode.Code);
|
||||
expect(getQueryWithDefaults({ refId: 'A', expr: '' }).editorMode).toEqual(QueryEditorMode.Code);
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user