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

minor changes

This commit is contained in:
lana-k
2021-02-28 21:27:26 +01:00
parent 46757bd5ef
commit 95d6d6131e
2 changed files with 9 additions and 13 deletions

View File

@@ -1,9 +1,9 @@
import Vue from 'vue'
import VueRouter from 'vue-router'
import Editor from '../views/Editor'
import MyQueries from '../views/MyQueries'
import Home from '../views/Home'
import MainView from '../views/MainView'
import Editor from '@/views/Editor'
import MyQueries from '@/views/MyQueries'
import Home from '@/views/Home'
import MainView from '@/views/MainView'
Vue.use(VueRouter)

View File

@@ -10,6 +10,10 @@ const localVue = createLocalVue()
localVue.use(Vuex)
describe('Schema.vue', () => {
afterEach(() => {
sinon.restore()
})
it('Renders DB name on initial', () => {
// mock store state
const state = {
@@ -149,14 +153,9 @@ describe('Schema.vue', () => {
]
}
const $db = {
loadDb (file) {
return Promise.resolve(newSchema)
}
loadDb: sinon.stub().resolves(newSchema)
}
// spy on $db.loadDb()
sinon.spy($db, 'loadDb')
// mount the component
const wrapper = mount(Schema, { store, localVue, mocks: { $db } })
@@ -170,8 +169,5 @@ describe('Schema.vue', () => {
await $db.loadDb.returnValues[0]
expect(mutations.saveSchema.calledOnceWith(state, newSchema)).to.equal(true)
$db.loadDb.restore()
fu.getFileFromUser.restore()
})
})