gradido/frontend/src/components/CloseButton.spec.js
2021-05-07 11:59:43 +02:00

29 lines
562 B
JavaScript

import { mount } from '@vue/test-utils'
import CloseButton from './CloseButton'
const localVue = global.localVue
describe('CloseButton', () => {
let wrapper
const propsData = {
target: 'Target',
expanded: false,
}
const Wrapper = () => {
return mount(CloseButton, { localVue, propsData })
}
describe('mount', () => {
beforeEach(() => {
wrapper = Wrapper()
})
it('emmits click event', () => {
wrapper.find('.navbar-toggler').trigger('click')
expect(wrapper.emitted('click')).toBeTruthy()
})
})
})