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

fix tests

This commit is contained in:
lana-k
2025-03-09 21:57:36 +01:00
parent 828cad6439
commit b5504b91ce
48 changed files with 7871 additions and 29372 deletions

View File

@@ -2,7 +2,7 @@ import { expect } from 'chai'
import { mount } from '@vue/test-utils'
import actions from '@/store/actions'
import mutations from '@/store/mutations'
import Vuex from 'vuex'
import { createStore } from 'vuex'
import Workspace from '@/views/Main/Workspace'
describe('Workspace.vue', () => {
@@ -11,13 +11,13 @@ describe('Workspace.vue', () => {
db: {},
tabs: []
}
const store = new Vuex.Store({ state, actions, mutations })
const store = createStore({ state, actions, mutations })
const $route = { path: '/workspace', query: {} }
mount(Workspace, {
store,
global: {
stubs: ['router-link'],
mocks: { $route }
stubs: ['router-link', 'modal'],
mocks: { $route },
plugins: [store]
}
})
@@ -34,13 +34,13 @@ describe('Workspace.vue', () => {
db: {},
tabs: []
}
const store = new Vuex.Store({ state, actions, mutations })
const store = createStore({ state, actions, mutations })
const $route = { path: '/workspace', query: { hide_schema: '1' } }
const vm = mount(Workspace, {
store,
global: {
stubs: ['router-link'],
mocks: { $route }
stubs: ['router-link', 'modal'],
mocks: { $route },
plugins: [store]
}
})