|
|
@@ -29,6 +29,13 @@ define([
|
|
|
describeValueFormat('ns', 25, 1, 0, '25 ns');
|
|
|
describeValueFormat('ns', 2558, 50, 0, '2.56 µs');
|
|
|
|
|
|
+ describe('kbn.toFixed and negative decimals', function() {
|
|
|
+ it('should treat as zero decimals', function() {
|
|
|
+ var str = kbn.toFixed(186.123, -2);
|
|
|
+ expect(str).to.be('186');
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
describe('calculateInterval', function() {
|
|
|
it('1h 100 resultion', function() {
|
|
|
var range = { from: kbn.parseDate('now-1h'), to: kbn.parseDate('now') };
|