mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Fixes #189, correction to ms axis formater, now formats days correctly
This commit is contained in:
23
src/test/specs/kbn-format-specs.js
Normal file
23
src/test/specs/kbn-format-specs.js
Normal 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');
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
@@ -115,6 +115,7 @@ require([
|
||||
'specs/parser-specs',
|
||||
'specs/gfunc-specs',
|
||||
'specs/filterSrv-specs',
|
||||
'specs/kbn-format-specs',
|
||||
], function () {
|
||||
window.__karma__.start();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user