Commit 55111c80 by Tobias Skarhed

Update test for local time

parent bff7a293
......@@ -23,6 +23,9 @@ describe('SingleStatCtrl', function() {
SingleStatCtrl.prototype.dashboard = {
isTimezoneUtc: jest.fn(() => true),
};
SingleStatCtrl.prototype.events = {
on: () => {},
};
function singleStatScenario(desc, func) {
describe(desc, function() {
......@@ -84,7 +87,7 @@ describe('SingleStatCtrl', function() {
});
it('should set formatted value', function() {
expect(ctx.data.valueFormatted).toBe('2017-09-17 09:56:37');
expect(moment(ctx.data.valueFormatted).isSame('2017-09-17 09:56:37')).toBe(true);
});
});
......@@ -235,7 +238,9 @@ describe('SingleStatCtrl', function() {
singleStatScenario('with default values', function(ctx) {
ctx.setup(function() {
ctx.data = tableData;
ctx.ctrl.panel = {};
ctx.ctrl.panel = {
emit: () => {},
};
ctx.ctrl.panel.tableColumn = 'mean';
ctx.ctrl.panel.format = 'none';
});
......
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