1
0
mirror of https://github.com/lana-k/sqliteviz.git synced 2025-12-06 18:18:53 +08:00

fix ISO time columns when no column names #66

This commit is contained in:
lana-k
2021-07-15 22:36:07 +02:00
parent fb930028de
commit 0f2dc9f11e
3 changed files with 9 additions and 7 deletions

View File

@@ -30,16 +30,16 @@ describe('csv.js', () => {
it('getResult without fields', () => {
const source = {
data: [
[1, 'foo'],
[2, 'bar']
[1, 'foo', new Date('2021-06-30T14:10:24.717Z')],
[2, 'bar', new Date('2021-07-30T14:10:15.717Z')]
],
meta: {}
}
expect(csv.getResult(source)).to.eql({
columns: ['col1', 'col2'],
columns: ['col1', 'col2', 'col3'],
values: [
[1, 'foo'],
[2, 'bar']
[1, 'foo', '2021-06-30T14:10:24.717Z'],
[2, 'bar', '2021-07-30T14:10:15.717Z']
]
})
})