Fixes #189, correction to ms axis formater, now formats days correctly

This commit is contained in:
Torkel Ödegaard
2014-04-06 09:17:21 +02:00
parent 49492e7bca
commit 305d5c5aa9
3 changed files with 28 additions and 10 deletions

View File

@@ -0,0 +1,23 @@
define([
'kbn'
], function(kbn) {
describe('millisecond formating', function() {
it('should translate 4378634603 as 1.67 years', function() {
var str = kbn.msFormat(4378634603, 2);
expect(str).to.be('50.68 day');
});
it('should translate 3654454 as 1.02 hour', function() {
var str = kbn.msFormat(3654454, 2);
expect(str).to.be('1.02 hour');
});
it('should translate 365445 as 6.09 min', function() {
var str = kbn.msFormat(365445, 2);
expect(str).to.be('6.09 min');
});
});
});

View File

@@ -115,6 +115,7 @@ require([
'specs/parser-specs',
'specs/gfunc-specs',
'specs/filterSrv-specs',
'specs/kbn-format-specs',
], function () {
window.__karma__.start();
});