mirror of
https://github.com/lana-k/sqliteviz.git
synced 2025-12-06 18:18:53 +08:00
CSV import as a table and db connection rework
- Add csv to existing db #32 - [RFE] Simplify working with temporary tables #53
This commit is contained in:
@@ -2,7 +2,6 @@ import { expect } from 'chai'
|
||||
import sinon from 'sinon'
|
||||
import mutations from '@/store/mutations'
|
||||
const {
|
||||
saveSchema,
|
||||
updateTab,
|
||||
deleteTab,
|
||||
setCurrentTabId,
|
||||
@@ -24,25 +23,6 @@ describe('mutations', () => {
|
||||
expect(oldDb.shutDown.calledOnce).to.equal(true)
|
||||
})
|
||||
|
||||
it('saveSchema', () => {
|
||||
const state = {}
|
||||
|
||||
const schema = [
|
||||
{
|
||||
name: 'table1',
|
||||
columns: [
|
||||
{ name: 'id', type: 'INTEGER' }
|
||||
]
|
||||
}
|
||||
]
|
||||
saveSchema(state, {
|
||||
dbName: 'test',
|
||||
schema
|
||||
})
|
||||
expect(state.dbName).to.equal('test')
|
||||
expect(state.schema).to.eql(schema)
|
||||
})
|
||||
|
||||
it('updateTab (save)', () => {
|
||||
const tab = {
|
||||
id: 1,
|
||||
|
||||
Reference in New Issue
Block a user