mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 02:42:09 +08:00
test
This commit is contained in:
30
public/app/core/utils/query.test.ts
Normal file
30
public/app/core/utils/query.test.ts
Normal file
@ -0,0 +1,30 @@
|
||||
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');
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user