TemplateSrv: Refactoring out all formats to a formatRegistry (#26607)

This commit is contained in:
Torkel Ödegaard
2020-07-28 07:27:59 +02:00
committed by GitHub
parent 0d933b79b7
commit cfac143244
5 changed files with 363 additions and 306 deletions

View File

@@ -595,11 +595,6 @@ describe('templateSrv', () => {
initTemplateSrv([]);
});
it('should be possible to fetch value with getBuilInIntervalValue', () => {
const val = _templateSrv.getBuiltInIntervalValue();
expect(val).toBe('1s');
});
it('should replace $__interval_ms with interval milliseconds', () => {
const target = _templateSrv.replace('10 * $__interval_ms', {
__interval_ms: { text: '100', value: '100' },