mirror of
https://github.com/lana-k/sqliteviz.git
synced 2025-12-07 02:28:54 +08:00
Compare commits
2 Commits
f55a8caa92
...
3a05b27400
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3a05b27400 | ||
|
|
108d96a753 |
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sqliteviz",
|
"name": "sqliteviz",
|
||||||
"version": "0.25.0",
|
"version": "0.25.1",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ describe('App.vue', () => {
|
|||||||
])
|
])
|
||||||
sinon.spy(storedInquiries, 'updateStorage')
|
sinon.spy(storedInquiries, 'updateStorage')
|
||||||
|
|
||||||
|
|
||||||
const state = {
|
const state = {
|
||||||
predefinedInquiries: [],
|
predefinedInquiries: [],
|
||||||
inquiries: []
|
inquiries: []
|
||||||
@@ -45,7 +44,9 @@ describe('App.vue', () => {
|
|||||||
expect(storedInquiries.updateStorage.calledTwice).to.equal(true)
|
expect(storedInquiries.updateStorage.calledTwice).to.equal(true)
|
||||||
|
|
||||||
expect(storedInquiries.updateStorage.args[1][0]).to.eql([
|
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' }
|
||||||
])
|
])
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { expect } from 'chai'
|
import { expect } from 'chai'
|
||||||
import actions from '@/store/actions'
|
import actions from '@/store/actions'
|
||||||
|
import sinon from 'sinon'
|
||||||
|
|
||||||
const {
|
const {
|
||||||
addTab,
|
addTab,
|
||||||
@@ -114,7 +115,7 @@ describe('actions', () => {
|
|||||||
inquiries: [
|
inquiries: [
|
||||||
{ id: 1, name: 'foo' },
|
{ id: 1, name: 'foo' },
|
||||||
{ id: 2, name: 'bar' },
|
{ id: 2, name: 'bar' },
|
||||||
{ id: 3, name: 'baz' },
|
{ id: 3, name: 'baz' }
|
||||||
],
|
],
|
||||||
tabs: [{ id: 1, name: 'foo' }, { id: 2, name: 'bar' }]
|
tabs: [{ id: 1, name: 'foo' }, { id: 2, name: 'bar' }]
|
||||||
}
|
}
|
||||||
@@ -124,7 +125,7 @@ describe('actions', () => {
|
|||||||
expect(state.inquiries).to.eql([
|
expect(state.inquiries).to.eql([
|
||||||
{ id: 1, name: 'foo' },
|
{ id: 1, name: 'foo' },
|
||||||
{ id: 2, name: 'new name' },
|
{ id: 2, name: 'new name' },
|
||||||
{ id: 3, name: 'baz' },
|
{ id: 3, name: 'baz' }
|
||||||
])
|
])
|
||||||
expect(commit.calledWith('updateTab', {
|
expect(commit.calledWith('updateTab', {
|
||||||
tab: { id: 2, name: 'bar' },
|
tab: { id: 2, name: 'bar' },
|
||||||
@@ -152,7 +153,7 @@ describe('actions', () => {
|
|||||||
}
|
}
|
||||||
const state = {
|
const state = {
|
||||||
inquiries: [],
|
inquiries: [],
|
||||||
tabs: [tab],
|
tabs: [tab]
|
||||||
}
|
}
|
||||||
|
|
||||||
const value = await saveInquiry({ state }, {
|
const value = await saveInquiry({ state }, {
|
||||||
@@ -183,7 +184,7 @@ describe('actions', () => {
|
|||||||
|
|
||||||
const state = {
|
const state = {
|
||||||
inquiries: [],
|
inquiries: [],
|
||||||
tabs: [tab],
|
tabs: [tab]
|
||||||
}
|
}
|
||||||
|
|
||||||
const first = await saveInquiry({ state }, {
|
const first = await saveInquiry({ state }, {
|
||||||
@@ -223,7 +224,7 @@ describe('actions', () => {
|
|||||||
|
|
||||||
const state = {
|
const state = {
|
||||||
inquiries: [],
|
inquiries: [],
|
||||||
tabs: [tab],
|
tabs: [tab]
|
||||||
}
|
}
|
||||||
|
|
||||||
await saveInquiry({ state }, {
|
await saveInquiry({ state }, {
|
||||||
|
|||||||
@@ -362,7 +362,6 @@ describe('MainMenu.vue', () => {
|
|||||||
const $route = { path: '/workspace' }
|
const $route = { path: '/workspace' }
|
||||||
sinon.stub(storedInquiries, 'isTabNeedName').returns(false)
|
sinon.stub(storedInquiries, 'isTabNeedName').returns(false)
|
||||||
|
|
||||||
|
|
||||||
wrapper = mount(MainMenu, {
|
wrapper = mount(MainMenu, {
|
||||||
store,
|
store,
|
||||||
mocks: { $route },
|
mocks: { $route },
|
||||||
|
|||||||
Reference in New Issue
Block a user