1
0
mirror of https://github.com/lana-k/sqliteviz.git synced 2025-12-06 10:08:52 +08:00
This commit is contained in:
lana-k
2025-01-12 22:00:48 +01:00
parent f55a8caa92
commit 108d96a753
9 changed files with 63 additions and 62 deletions

View File

@@ -31,7 +31,6 @@ describe('App.vue', () => {
])
sinon.spy(storedInquiries, 'updateStorage')
const state = {
predefinedInquiries: [],
inquiries: []
@@ -45,7 +44,9 @@ describe('App.vue', () => {
expect(storedInquiries.updateStorage.calledTwice).to.equal(true)
expect(storedInquiries.updateStorage.args[1][0]).to.eql([
{id: 1, name: 'new foo name'}, {id: 2, name: 'baz'}, {id: 3, name: 'bar'}
{ id: 1, name: 'new foo name' },
{ id: 2, name: 'baz' },
{ id: 3, name: 'bar' }
])
})
})

View File

@@ -1,5 +1,6 @@
import { expect } from 'chai'
import actions from '@/store/actions'
import sinon from 'sinon'
const {
addTab,
@@ -114,7 +115,7 @@ describe('actions', () => {
inquiries: [
{ id: 1, name: 'foo' },
{ id: 2, name: 'bar' },
{ id: 3, name: 'baz' },
{ id: 3, name: 'baz' }
],
tabs: [{ id: 1, name: 'foo' }, { id: 2, name: 'bar' }]
}
@@ -124,7 +125,7 @@ describe('actions', () => {
expect(state.inquiries).to.eql([
{ id: 1, name: 'foo' },
{ id: 2, name: 'new name' },
{ id: 3, name: 'baz' },
{ id: 3, name: 'baz' }
])
expect(commit.calledWith('updateTab', {
tab: { id: 2, name: 'bar' },
@@ -152,7 +153,7 @@ describe('actions', () => {
}
const state = {
inquiries: [],
tabs: [tab],
tabs: [tab]
}
const value = await saveInquiry({ state }, {
@@ -183,7 +184,7 @@ describe('actions', () => {
const state = {
inquiries: [],
tabs: [tab],
tabs: [tab]
}
const first = await saveInquiry({ state }, {
@@ -223,7 +224,7 @@ describe('actions', () => {
const state = {
inquiries: [],
tabs: [tab],
tabs: [tab]
}
await saveInquiry({ state }, {

View File

@@ -362,7 +362,6 @@ describe('MainMenu.vue', () => {
const $route = { path: '/workspace' }
sinon.stub(storedInquiries, 'isTabNeedName').returns(false)
wrapper = mount(MainMenu, {
store,
mocks: { $route },