|
|
@@ -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() {
|