1
0
mirror of https://github.com/lana-k/sqliteviz.git synced 2025-12-06 18:18:53 +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

@@ -1,7 +1,7 @@
import { expect } from 'chai'
import sinon from 'sinon'
import { mount } from '@vue/test-utils'
import Vuex from 'vuex'
import { createStore } from 'vuex'
import LoadView from '@/views/LoadView'
import fu from '@/lib/utils/fileIo'
import database from '@/lib/database'
@@ -26,7 +26,7 @@ describe('LoadView.vue', () => {
const actions = {
addTab: sinon.stub().callsFake(realActions.addTab)
}
const store = new Vuex.Store({ state, mutations, actions })
const store = createStore({ state, mutations, actions })
const $route = {
path: '/workspace',
query: {
@@ -58,10 +58,10 @@ describe('LoadView.vue', () => {
Tab.prototype.execute = sinon.stub()
const wrapper = mount(LoadView, {
store,
global: {
mocks: { $route, $router },
stubs: ['router-link']
stubs: ['router-link'],
plugins: [store]
}
})
@@ -106,7 +106,7 @@ describe('LoadView.vue', () => {
const actions = {
addTab: sinon.stub().callsFake(realActions.addTab)
}
const store = new Vuex.Store({ state, mutations, actions })
const store = createStore({ state, mutations, actions })
const $route = {
path: '/workspace',
query: {
@@ -136,10 +136,10 @@ describe('LoadView.vue', () => {
})
const wrapper = mount(LoadView, {
store,
global: {
mocks: { $route, $router },
stubs: ['router-link']
stubs: ['router-link'],
plugins: [store]
}
})