Robert Schäfer b70e5be8b1 Follow file naming convention
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.
2019-04-16 01:39:47 +02:00

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'
)
})
})
})
})