mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
36 lines
715 B
JavaScript
36 lines
715 B
JavaScript
import { shallowMount, createLocalVue } from '@vue/test-utils'
|
|
import Styleguide from '@human-connection/styleguide'
|
|
import Category from './index'
|
|
|
|
const localVue = createLocalVue()
|
|
localVue.use(Styleguide)
|
|
|
|
describe('Category', () => {
|
|
let icon
|
|
let name
|
|
|
|
const Wrapper = () => {
|
|
return shallowMount(Category, {
|
|
localVue,
|
|
propsData: {
|
|
icon,
|
|
name,
|
|
},
|
|
})
|
|
}
|
|
|
|
describe('given Strings for Icon and Name', () => {
|
|
beforeEach(() => {
|
|
icon = 'mouse-cursor'
|
|
name = 'Peter'
|
|
})
|
|
|
|
it('shows Name', () => {
|
|
expect(Wrapper().text()).toContain('Peter')
|
|
})
|
|
it('shows Icon Svg', () => {
|
|
expect(Wrapper().contains('svg'))
|
|
})
|
|
})
|
|
})
|