mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
InputDataSource: better empty value support (#17075)
This commit is contained in:
committed by
Torkel Ödegaard
parent
238a929262
commit
d8280b895d
@@ -1,4 +1,4 @@
|
||||
import InputDatasource from './InputDatasource';
|
||||
import InputDatasource, { describeSeriesData } from './InputDatasource';
|
||||
import { InputQuery, InputOptions } from './types';
|
||||
import { readCSV, DataSourceInstanceSettings, PluginMeta } from '@grafana/ui';
|
||||
import { getQueryOptions } from 'test/helpers/getQueryOptions';
|
||||
@@ -31,4 +31,18 @@ describe('InputDatasource', () => {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
test('SeriesData descriptions', () => {
|
||||
expect(describeSeriesData([])).toEqual('');
|
||||
expect(describeSeriesData(null)).toEqual('');
|
||||
expect(
|
||||
describeSeriesData([
|
||||
{
|
||||
name: 'x',
|
||||
fields: [{ name: 'a' }],
|
||||
rows: [],
|
||||
},
|
||||
])
|
||||
).toEqual('1 Fields, 0 Rows');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user