mirror of
https://github.com/apache/superset.git
synced 2026-04-20 00:24:38 +00:00
fix: leave null timestamp unformatted in view results table (#10313)
This commit is contained in:
@@ -72,12 +72,16 @@ describe('utils/common', () => {
|
||||
});
|
||||
it('changes formatting of temporal column', () => {
|
||||
const originalData = [
|
||||
{ __timestamp: 1594285437771, column1: 'lorem' },
|
||||
{ __timestamp: 1594285441675, column1: 'ipsum' },
|
||||
{ __timestamp: null, column1: 'lorem' },
|
||||
{ __timestamp: 0, column1: 'ipsum' },
|
||||
{ __timestamp: 1594285437771, column1: 'dolor' },
|
||||
{ __timestamp: 1594285441675, column1: 'sit' },
|
||||
];
|
||||
const expectedData = [
|
||||
{ __timestamp: '2020-07-09 09:03:57', column1: 'lorem' },
|
||||
{ __timestamp: '2020-07-09 09:04:01', column1: 'ipsum' },
|
||||
{ __timestamp: null, column1: 'lorem' },
|
||||
{ __timestamp: '1970-01-01 00:00:00', column1: 'ipsum' },
|
||||
{ __timestamp: '2020-07-09 09:03:57', column1: 'dolor' },
|
||||
{ __timestamp: '2020-07-09 09:04:01', column1: 'sit' },
|
||||
];
|
||||
expect(applyFormattingToTabularData(originalData)).toEqual(expectedData);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user