mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
All components should consist of a folder with these three files: ``` README.d index.vue spec.js ``` When you import components, omit the `index.vue`. That helps to `git grep` for component names.
45 lines
910 B
JavaScript
45 lines
910 B
JavaScript
import { mount, createLocalVue } from '@vue/test-utils'
|
|
import Editor from './'
|
|
|
|
import Styleguide from '@human-connection/styleguide'
|
|
|
|
const localVue = createLocalVue()
|
|
localVue.use(Styleguide)
|
|
|
|
describe('Editor.vue', () => {
|
|
let wrapper
|
|
let propsData
|
|
|
|
beforeEach(() => {
|
|
propsData = {}
|
|
})
|
|
|
|
describe('mount', () => {
|
|
let Wrapper = () => {
|
|
return (wrapper = mount(Editor, {
|
|
propsData,
|
|
localVue,
|
|
sync: false,
|
|
stubs: { transition: false }
|
|
}))
|
|
}
|
|
|
|
it('renders', () => {
|
|
expect(Wrapper().is('div')).toBe(true)
|
|
})
|
|
|
|
describe('given a piece of text', () => {
|
|
beforeEach(() => {
|
|
propsData.value = 'I am a piece of text'
|
|
})
|
|
|
|
it.skip('renders', () => {
|
|
wrapper = Wrapper()
|
|
expect(wrapper.find('.ProseMirror').text()).toContain(
|
|
'I am a piece of text'
|
|
)
|
|
})
|
|
})
|
|
})
|
|
})
|