changed m3 and dm3 to fixedUnit, fixes #10920 (#10944)

This commit is contained in:
Patrick O'Carroll
2018-02-19 09:23:02 +01:00
committed by Torkel Ödegaard
parent f47542db28
commit 9c36ee22a8
2 changed files with 9 additions and 2 deletions

View File

@@ -348,3 +348,10 @@ describe('duration', function() {
expect(str).toBe('1 year, 2 months, 0 weeks, 3 days, 4 hours, 5 minutes, 6 seconds, 7 milliseconds');
});
});
describe('volume', function() {
it('1000m3', function() {
var str = kbn.valueFormats['m3'](1000, 1, null);
expect(str).toBe('1000.0 m3');
});
});

View File

@@ -547,8 +547,8 @@ kbn.valueFormats.accG = kbn.formatBuilders.fixedUnit('g');
// Volume
kbn.valueFormats.litre = kbn.formatBuilders.decimalSIPrefix('L');
kbn.valueFormats.mlitre = kbn.formatBuilders.decimalSIPrefix('L', -1);
kbn.valueFormats.m3 = kbn.formatBuilders.decimalSIPrefix('m3');
kbn.valueFormats.dm3 = kbn.formatBuilders.decimalSIPrefix('dm3');
kbn.valueFormats.m3 = kbn.formatBuilders.fixedUnit('m3');
kbn.valueFormats.dm3 = kbn.formatBuilders.fixedUnit('dm3');
kbn.valueFormats.gallons = kbn.formatBuilders.fixedUnit('gal');
// Flow