mirror of
https://github.com/lana-k/sqliteviz.git
synced 2025-12-07 02:28:54 +08:00
move tests to tests folder
rename util modules rename DbUpload to DbUploader add tests for DbUploader component #27
This commit is contained in:
11
tests/components/SqlEditor.spec.js
Normal file
11
tests/components/SqlEditor.spec.js
Normal file
@@ -0,0 +1,11 @@
|
||||
import { expect } from 'chai'
|
||||
import { mount } from '@vue/test-utils'
|
||||
import SqlEditor from '@/components/SqlEditor.vue'
|
||||
|
||||
describe('SqlEditor.vue', () => {
|
||||
it('Emits input event when a query is changed', async () => {
|
||||
const wrapper = mount(SqlEditor)
|
||||
await wrapper.findComponent({ name: 'codemirror' }).vm.$emit('input', 'SELECT * FROM foo')
|
||||
expect(wrapper.emitted('input')[0]).to.eql(['SELECT * FROM foo'])
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user