mirror of
https://github.com/grafana/grafana.git
synced 2025-02-15 01:53:33 -06:00
31 lines
488 B
TypeScript
31 lines
488 B
TypeScript
import { DataQuery } from '@grafana/ui';
|
|
import { getNextRefIdChar } from './query';
|
|
|
|
const dataQueries: DataQuery[] = [
|
|
{
|
|
refId: 'A',
|
|
},
|
|
{
|
|
refId: 'B',
|
|
},
|
|
{
|
|
refId: 'C',
|
|
},
|
|
{
|
|
refId: 'D',
|
|
},
|
|
{
|
|
refId: 'E',
|
|
},
|
|
];
|
|
|
|
describe('Get next refId char', () => {
|
|
it('should return next char', () => {
|
|
expect(getNextRefIdChar(dataQueries)).toEqual('F');
|
|
});
|
|
|
|
it('should get first char', () => {
|
|
expect(getNextRefIdChar([])).toEqual('A');
|
|
});
|
|
});
|