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

add CSV support #27

This commit is contained in:
lana-k
2021-04-09 16:43:20 +02:00
parent c2864b4308
commit b30eeb6788
23 changed files with 1084 additions and 357 deletions

View File

@@ -0,0 +1,17 @@
import { expect } from 'chai'
import dbUtils from '@/dbUtils.js'
describe('dbUtils.js', () => {
it('generator', () => {
const arr = ['1', '2', '3', '4', '5']
const size = 2
const chunks = dbUtils.generateChunks(arr, size)
const output = []
for (const chunk of chunks) {
output.push(chunk)
}
expect(output[0]).to.eql(['1', '2'])
expect(output[1]).to.eql(['3', '4'])
expect(output[2]).to.eql(['5'])
})
})