mirror of
https://github.com/grafana/grafana.git
synced 2024-11-26 19:00:54 -06:00
test if default variable interpolation is effective when no specific
format is specified
This commit is contained in:
parent
764fa15e24
commit
a806f542c6
@ -136,6 +136,11 @@ describe('templateSrv', function() {
|
||||
var target = _templateSrv.replace('this=${test:pipe}', {});
|
||||
expect(target).toBe('this=value1|value2');
|
||||
});
|
||||
|
||||
it('should replace ${test:pipe} with piped value and $test with globbed value', function() {
|
||||
var target = _templateSrv.replace('${test:pipe},$test', {}, 'glob');
|
||||
expect(target).toBe('value1|value2,{value1,value2}');
|
||||
});
|
||||
});
|
||||
|
||||
describe('variable with all option', function() {
|
||||
@ -164,6 +169,11 @@ describe('templateSrv', function() {
|
||||
var target = _templateSrv.replace('this.${test:glob}.filters', {});
|
||||
expect(target).toBe('this.{value1,value2}.filters');
|
||||
});
|
||||
|
||||
it('should replace ${test:pipe} with piped value and $test with globbed value', function() {
|
||||
var target = _templateSrv.replace('${test:pipe},$test', {}, 'glob');
|
||||
expect(target).toBe('value1|value2,{value1,value2}');
|
||||
});
|
||||
});
|
||||
|
||||
describe('variable with all option and custom value', function() {
|
||||
|
Loading…
Reference in New Issue
Block a user