1
0
mirror of https://github.com/lana-k/sqliteviz.git synced 2025-12-08 02:58:54 +08:00
This commit is contained in:
lana-k
2021-04-27 22:51:36 +02:00
parent 35baaf2722
commit 9ed53e0d25
13 changed files with 105 additions and 25 deletions

View File

@@ -98,4 +98,18 @@ describe('Schema.vue', () => {
expect(tables.at(1).vm.name).to.equal('bar')
expect(tables.at(2).vm.name).to.equal('foobar')
})
it('exports db', async () => {
const state = {
dbName: 'fooDB',
db: {
export: sinon.stub().resolves()
}
}
const store = new Vuex.Store({ state })
const wrapper = mount(Schema, { store, localVue })
await wrapper.findComponent({ name: 'export-icon' }).trigger('click')
expect(state.db.export.calledOnceWith('fooDB'))
})
})