mirror of
https://github.com/lana-k/sqliteviz.git
synced 2025-12-06 18:18:53 +08:00
#115 fix tests
This commit is contained in:
@@ -97,7 +97,8 @@ export default {
|
|||||||
this.formattedJson = JSON.stringify(
|
this.formattedJson = JSON.stringify(
|
||||||
JSON.parse(jsonStr), null, 4
|
JSON.parse(jsonStr), null, 4
|
||||||
)
|
)
|
||||||
} catch {
|
} catch (e) {
|
||||||
|
console.error(e)
|
||||||
this.formattedJson = ''
|
this.formattedJson = ''
|
||||||
this.messages = [{
|
this.messages = [{
|
||||||
type: 'error',
|
type: 'error',
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ describe('RunResult.vue', () => {
|
|||||||
sinon.spy(window, 'alert')
|
sinon.spy(window, 'alert')
|
||||||
const wrapper = mount(RunResult, {
|
const wrapper = mount(RunResult, {
|
||||||
propsData: {
|
propsData: {
|
||||||
|
tab: { id: 1 },
|
||||||
result: {
|
result: {
|
||||||
columns: ['id', 'name'],
|
columns: ['id', 'name'],
|
||||||
values: {
|
values: {
|
||||||
@@ -44,6 +45,7 @@ describe('RunResult.vue', () => {
|
|||||||
const clock = sinon.useFakeTimers()
|
const clock = sinon.useFakeTimers()
|
||||||
const wrapper = mount(RunResult, {
|
const wrapper = mount(RunResult, {
|
||||||
propsData: {
|
propsData: {
|
||||||
|
tab: { id: 1 },
|
||||||
result: {
|
result: {
|
||||||
columns: ['id', 'name'],
|
columns: ['id', 'name'],
|
||||||
values: {
|
values: {
|
||||||
@@ -89,6 +91,7 @@ describe('RunResult.vue', () => {
|
|||||||
const clock = sinon.useFakeTimers()
|
const clock = sinon.useFakeTimers()
|
||||||
const wrapper = mount(RunResult, {
|
const wrapper = mount(RunResult, {
|
||||||
propsData: {
|
propsData: {
|
||||||
|
tab: { id: 1 },
|
||||||
result: {
|
result: {
|
||||||
columns: ['id', 'name'],
|
columns: ['id', 'name'],
|
||||||
values: {
|
values: {
|
||||||
@@ -122,6 +125,7 @@ describe('RunResult.vue', () => {
|
|||||||
const clock = sinon.useFakeTimers()
|
const clock = sinon.useFakeTimers()
|
||||||
const wrapper = mount(RunResult, {
|
const wrapper = mount(RunResult, {
|
||||||
propsData: {
|
propsData: {
|
||||||
|
tab: { id: 1 },
|
||||||
result: {
|
result: {
|
||||||
columns: ['id', 'name'],
|
columns: ['id', 'name'],
|
||||||
values: {
|
values: {
|
||||||
|
|||||||
Reference in New Issue
Block a user