mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
began work on built in template variables, #7190
This commit is contained in:
@@ -239,4 +239,16 @@ describe('templateSrv', function() {
|
||||
expect(target).to.be('Server: All, period: 13m');
|
||||
});
|
||||
});
|
||||
|
||||
describe('built in interval variables', function() {
|
||||
beforeEach(function() {
|
||||
initTemplateSrv([]);
|
||||
});
|
||||
|
||||
it('should replace $interval_ms with interval milliseconds', function() {
|
||||
var target = _templateSrv.replace('10 * $interval_ms', {"interval_ms": {text: "100", value: "100"}});
|
||||
expect(target).to.be('10 * 100');
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user