Commit 94d129e4 by Peter Holmberg

add one more test

parent 08a4c9f6
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment