mirror of
https://github.com/grafana/grafana.git
synced 2025-01-10 08:03:58 -06:00
bb45f5fedc
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com> Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
40 lines
1.0 KiB
TypeScript
40 lines
1.0 KiB
TypeScript
import { isPipelineAgg, isPipelineAggWithMultipleBucketPaths } from '../query_def';
|
|
|
|
describe('ElasticQueryDef', () => {
|
|
describe('isPipelineMetric', () => {
|
|
describe('moving_avg', () => {
|
|
const result = isPipelineAgg('moving_avg');
|
|
|
|
test('is pipe line metric', () => {
|
|
expect(result).toBe(true);
|
|
});
|
|
});
|
|
|
|
describe('count', () => {
|
|
const result = isPipelineAgg('count');
|
|
|
|
test('is not pipe line metric', () => {
|
|
expect(result).toBe(false);
|
|
});
|
|
});
|
|
});
|
|
|
|
describe('isPipelineAggWithMultipleBucketPaths', () => {
|
|
describe('bucket_script', () => {
|
|
const result = isPipelineAggWithMultipleBucketPaths('bucket_script');
|
|
|
|
test('should have multiple bucket paths support', () => {
|
|
expect(result).toBe(true);
|
|
});
|
|
});
|
|
|
|
describe('moving_avg', () => {
|
|
const result = isPipelineAggWithMultipleBucketPaths('moving_avg');
|
|
|
|
test('should not have multiple bucket paths support', () => {
|
|
expect(result).toBe(false);
|
|
});
|
|
});
|
|
});
|
|
});
|