mirror of
https://github.com/lana-k/sqliteviz.git
synced 2025-12-07 02:28:54 +08:00
fix lint errors
This commit is contained in:
@@ -2,14 +2,14 @@ import { expect } from 'chai'
|
|||||||
import sinon from 'sinon'
|
import sinon from 'sinon'
|
||||||
import { mount, shallowMount } from '@vue/test-utils'
|
import { mount, shallowMount } from '@vue/test-utils'
|
||||||
import Chart from '@/components/Chart.vue'
|
import Chart from '@/components/Chart.vue'
|
||||||
import chart from '@/chart.js'
|
import chart from '@/chart.js'
|
||||||
import * as dereference from 'react-chart-editor/lib/lib/dereference'
|
import * as dereference from 'react-chart-editor/lib/lib/dereference'
|
||||||
|
|
||||||
describe('Chart.vue', () => {
|
describe('Chart.vue', () => {
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
sinon.restore()
|
sinon.restore()
|
||||||
})
|
})
|
||||||
|
|
||||||
it('getChartStateForSave called with proper arguments', () => {
|
it('getChartStateForSave called with proper arguments', () => {
|
||||||
// mount the component
|
// mount the component
|
||||||
const wrapper = shallowMount(Chart)
|
const wrapper = shallowMount(Chart)
|
||||||
@@ -25,7 +25,7 @@ describe('Chart.vue', () => {
|
|||||||
const wrapper = shallowMount(Chart, {
|
const wrapper = shallowMount(Chart, {
|
||||||
propsData: { visible: false }
|
propsData: { visible: false }
|
||||||
})
|
})
|
||||||
|
|
||||||
expect(wrapper.find('.chart-container').isVisible()).to.equal(false)
|
expect(wrapper.find('.chart-container').isVisible()).to.equal(false)
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ describe('Chart.vue', () => {
|
|||||||
const wrapper = shallowMount(Chart, {
|
const wrapper = shallowMount(Chart, {
|
||||||
propsData: { visible: true }
|
propsData: { visible: true }
|
||||||
})
|
})
|
||||||
|
|
||||||
expect(wrapper.find('.chart-container').isVisible()).to.equal(true)
|
expect(wrapper.find('.chart-container').isVisible()).to.equal(true)
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ describe('Chart.vue', () => {
|
|||||||
values: [[2, 'bar']]
|
values: [[2, 'bar']]
|
||||||
}
|
}
|
||||||
|
|
||||||
await wrapper.setProps({sqlResult: newSqlResult})
|
await wrapper.setProps({ sqlResult: newSqlResult })
|
||||||
expect(dereference.default.called).to.equal(true)
|
expect(dereference.default.called).to.equal(true)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user