mirror of
https://github.com/grafana/grafana.git
synced 2024-11-29 20:24:18 -06:00
add one more test
This commit is contained in:
parent
08a4c9f6fa
commit
94d129e479
@ -151,6 +151,13 @@ describe('Format value', () => {
|
||||
expect(instance(value).text).toEqual('1.2');
|
||||
});
|
||||
|
||||
it('should set auto decimals, 2 significant', () => {
|
||||
const value = '0.0245';
|
||||
const instance = getDisplayProcessor({ decimals: null });
|
||||
|
||||
expect(instance(value).text).toEqual('0.02');
|
||||
});
|
||||
|
||||
it('should return mapped value if there are matching value mappings', () => {
|
||||
const valueMappings: ValueMapping[] = [
|
||||
{ id: 0, operator: '', text: '1-20', type: MappingType.RangeToText, from: '1', to: '20' },
|
||||
|
@ -61,10 +61,6 @@ export function getDisplayProcessor(options?: DisplayValueOptions): DisplayProce
|
||||
decimals = options.decimals;
|
||||
}
|
||||
|
||||
console.log('coin coin', value);
|
||||
console.log(decimals);
|
||||
console.log(scaledDecimals);
|
||||
|
||||
text = formatFunc(numeric, decimals, scaledDecimals, options.isUtc);
|
||||
}
|
||||
if (thresholds && thresholds.length > 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user